Font antialiasing v2
PATCH 1/1 Font antialiasing v2
Hello!
Here is improved patch for fonts anti-aliasing. Includes:
1) Optimized blending blitters for 8-bit masks;
2) Absolute compatibility with pf2 format. No PFF3 magic additions.
Affected files:font/font.cinclude/grub/fbblit.hinclude/grub/font.hinclude/grub/fontformat.hinclude/grub/video.hutil/grub-mkfont.cvideo/video.cvideo/fb/fbblit.cvideo/fb/fbutil.cvideo/fb/video_fb.c
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: evgenyz@ek-20100224133950-b4dozlkyyaiowzlr # target_branch: http://bzr.savannah.gnu.org/r/grub/trunk/grub/
# testament_sha1: 859c9fb07d2ff3ac48712480631b9cc98c1abbee # timestamp: 2010-02-24 19:40:56 +0600
# base_revision_id: [email protected] #
# Begin patch
=== modified file 'font/font.c'
font.c +30 -14
@@ -33,7 +33,7 @@#endif #ifndef FONT_DEBUG -#define FONT_DEBUG 0 +#define FONT_DEBUG 0#endif struct char_index_entry
@@ -740,14 +740,38 @@return 0 ; } - len = (width * height +7 ) /8 ; +enum grub_video_blit_format blit_format; +unsigned int mode_type; + +if ((index_entry->storage_flags &FONT_FORMAT_STORAGE_DEPTH_MASK ) ==FONT_FORMAT_STORAGE_8BIT_GRAY ) + { + len = (width * height); + blit_format =GRUB_VIDEO_BLIT_FORMAT_8BIT_MASK ; + mode_type =GRUB_VIDEO_MODE_TYPE_RGB ; + } +else if ((index_entry->storage_flags &FONT_FORMAT_STORAGE_DEPTH_MASK ) ==FONT_FORMAT_STORAGE_1BIT ) + { +/* 1 bpp */ + len = (width * height +7 ) /8 ; + blit_format =GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED_MASK ; + mode_type =GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP ; + } +else + { +remove_font (font); +return 0 ; + } + glyph =grub_malloc (sizeof (struct grub_font_glyph ) + len);if (! glyph) {remove_font (font);return 0 ; } - + + glyph->blit_format = blit_format; + glyph->mode_type = mode_type; + glyph->font = font; glyph->width = width; glyph->height = height;
@@ -1066,17 +1090,9 @@ glyph_bitmap.mode_info.height = glyph->height; glyph_bitmap.mode_info.mode_type = (1 <<GRUB_VIDEO_MODE_TYPE_DEPTH_POS ) - |GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP ; - glyph_bitmap.mode_info.blit_format =GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED ; - glyph_bitmap.mode_info.bpp =1 ; - -/* Really 1 bit per pixel. */ - glyph_bitmap.mode_info.bytes_per_pixel =0 ; - -/* Packed densely as bits. */ - glyph_bitmap.mode_info.pitch = glyph->width; - - glyph_bitmap.mode_info.number_of_colors =2 ; + | glyph->mode_type; + glyph_bitmap.mode_info.blit_format = glyph->blit_format; + glyph_bitmap.mode_info.bg_red =0 ; glyph_bitmap.mode_info.bg_green =0 ; glyph_bitmap.mode_info.bg_blue =0 ;
=== modified file 'include/grub/fbblit.h'
grub/fbblit.h +68 -47
119 lines not on this page · raw message
=== modified file 'include/grub/font.h'
grub/font.h +3 -0
@@ -59,6 +59,9 @@/* Number of pixels to advance to start the next character. */ grub_uint16_t device_width; + +enum grub_video_blit_format blit_format; +unsigned int mode_type;/* Row-major order, packed bits (no padding; rows can break within a byte). The length of the array is (width * height + 7) / 8. Within a
=== modified file 'include/grub/fontformat.h'
grub/fontformat.h +6 -0
@@ -34,5 +34,11 @@#define FONT_FORMAT_SECTION_NAMES_FAMILY "FAMI"#define FONT_FORMAT_SECTION_NAMES_SLAN "SLAN" +#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32 +#endif /* ! GRUB_FONT_FORMAT_HEADER */
=== modified file 'include/grub/video.h'
grub/video.h +5 -2
@@ -79,8 +79,11 @@/* When needed, decode color or just use value as is. */ GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR , -/* Two color bitmap; bits packed: rows are not padded to byte boundary. */ - GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED +/* Masks. Uses bg_* and fg_* fields in grub_video_mode_info */ +/* Two levels of alpha mask, 1-bit; bits packed: rows are not padded to byte boundary. */ +GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED_MASK , +/* 8-bit alpha mask */ + GRUB_VIDEO_BLIT_FORMAT_8BIT_MASK, };/* Define blitting operators. */
=== modified file 'util/grub-mkfont.c'
grub-mkfont.c +103 -62
270 lines not on this page · raw message
=== modified file 'video/fb/fbblit.c'
fb/fbblit.c +267 -41
358 lines not on this page · raw message
=== modified file 'video/fb/fbutil.c'
fb/fbutil.c +2 -2
@@ -96,7 +96,7 @@break ;case 1 : -if (source->mode_info->blit_format ==GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED ) +if (source->mode_info->blit_format ==GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED_MASK ) {int bit_index = y * source->mode_info->width + x;grub_uint8_t *ptr = source->data + bit_index /8 ;
@@ -163,7 +163,7 @@break ;case 1 : -if (source->mode_info->blit_format ==GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED ) +if (source->mode_info->blit_format ==GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED_MASK ) {int bit_index = y * source->mode_info->width + x;grub_uint8_t *ptr = source->data + bit_index /8 ;
=== modified file 'video/fb/video_fb.c'
fb/video_fb.c +79 -48
154 lines not on this page · raw message
=== modified file 'video/video.c'
video.c +1 -1
@@ -190,7 +190,7 @@ } }else if (mode_info->bpp ==1 ) -return GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED ; +return GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED_MASK ;/* Backup route. Unknown format. */
# Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWQMeauMAFld/gH1/SAB7//// /+/fbr////5gGR999Xj7L3uKxffA+vn1Fez57eet7rfe+oVRIABTWun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ZKQNoJ5tPaCw8QRoDfto+O0N55xNQA3i+47Vb2AAqAsyAMFb 5BglTcBlxXQ+r03KoHdnKobXkeycxigv4DY37yZtXC80DgqryAe7x+/neVxOBy8VWIPUwuPdCTSS koqhVHvF7MnxXnnNHUzsHCUACkX6+IuUNLu6bLAH14GXrLmoSuChFCCRciNiqNRQC1naOlSlU0Ql EYiKuMIBx3mbGdZK64KaDu3XSnZRW9gsReoFqmWw3jaA9ZfKEtqSKgDAqwFnQLqNN1AqaRC+RiwB ZgOMZNx2Cdex9ZYEvsR9Z8nsPSXQf9Cb5GxTAUcEICZk83CigpEzXt84u5IpwoSAGPNXGA==
Hello, all!
I understand that everyone was busy working on
recent release of GRUB, but does anybody have
any comments on this version of patch?
Quoted 6 lines · Evgeny Kolesnikov
Hello, all!
I understand that everyone was busy working on
recent release of GRUB, but does anybody have
any comments on this version of patch?
Like many other mails this one is "on my desk". I'm happy that community is active but this and next week I have other concerns but I'll process the pile once I have time
Quoted 8 lines
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 7 lines · Evgeny Kolesnikov
Hello!
Here is improved patch for fonts anti-aliasing. Includes:
1) Optimized blending blitters for 8-bit masks;
2) Absolute compatibility with pf2 format. No PFF3 magic additions.
Quoted 13 lines
Affected files:
font/font.cinclude/grub/fbblit.hinclude/grub/font.hinclude/grub/fontformat.hinclude/grub/video.hutil/grub-mkfont.cvideo/video.cvideo/fb/fbblit.cvideo/fb/fbutil.cvideo/fb/video_fb.c
- for (j = font_info->ranges[i * 2]; j <= font_info->ranges[i * 2 + 1];
- j++)
- add_char (font_info, face, j);
+ for (j = font_info->ranges[i * 2]; j <= font_info->ranges[i * 2 + 1]; j++)
+ add_char (font_info, face, j);
Can you fix the style of your patch to avoid hunks like these? (Hint:
GNU indent)
- glyph_bitmap.mode_info.blit_format = GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED;
- glyph_bitmap.mode_info.bpp = 1;
-
- /* Really 1 bit per pixel. */
- glyph_bitmap.mode_info.bytes_per_pixel = 0;
-
These bits need to be filled even if blit_format is set
+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F
+#define FONT_FORMAT_STORAGE_PACKED 1
+#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0
+#define FONT_FORMAT_STORAGE_1BIT 0
+#define FONT_FORMAT_STORAGE_8BIT_GRAY 32
Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as STORAGE_FORMAT
Also I doubt usefulness of a font in which only some glyphs are anti-aliased. Perhaps we could move antialiasing flags to file header and shave off few bytes?
Another point is that although storage_flags are present since some time trying to use antialised fonts in older grub will result in garbage. I prefer to put PFF3 signature if any flag is used. It will also allow more freedom it fields specification,
+ fgcolor = grub_video_fb_map_rgba (src->mode_info->fg_red,
+ src->mode_info->fg_green, + src->mode_info->fg_blue, + src->mode_info->fg_alpha);
background color isn't handled correctly (it's not always transparent)
+ grub_uint8_t fa, a;
Please avoid mixing declarations and code
+
Quoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 8 lines · Vladimir 'φ-coder/phcoder' Serbinenko
grub-mkfont.c +2
-3-for (j = font_info->ranges[i *2 ]; j <= font_info->ranges[i *2 +1 ]; - j++) -add_char (font_info, face, j); +for (j = font_info->ranges[i *2 ]; j <= font_info->ranges[i *2 +1 ]; j++) +add_char (font_info, face, j);Can you fix the style of your patch to avoid hunks like these? (Hint:
GNU indent)
Most of sources related to font functionality contains awful mix of spaces and tabs. Should I fix this? Strictly use spaces everywhere?
Quoted 7 lines
font.c +0
-6- glyph_bitmap.mode_info.blit_format =GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED ; - glyph_bitmap.mode_info.bpp =1 ; - -/* Really 1 bit per pixel. */ - glyph_bitmap.mode_info.bytes_per_pixel =0 ; -These bits need to be filled even if
blit_formatis set
OK.
Quoted 6 lines
grub/fontformat.h +5
-0+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as
STORAGE_FORMAT
This byte is already wasted with packed/unpacked bit.
3 bits actually, others as reserved. And I used reserved ones. See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2).
Quoted 1 line
Also I doubt usefulness of a font in which only some glyphs are anti-aliased. Perhaps we could move antialiasing flags to file header and shave off few bytes?
Yes this makes sense. I.e. substitution glyph for unknown symbol have no AA. Also frames and other geometry can benefit from this. Anyway this byte is already wasted in original spec.
Moreover I thinking about transparent gz or xz reader for font file. This will drastically reduce the size.
Quoted 1 line
Another point is that although
storage_flagsare present since some time trying to use antialised fonts in older grub will result in garbage. I prefer to put PFF3 signature if any flag is used. It will also allow more freedom it fields specification,
Well, generally I agree. This will be more evident in case of troubles.
Quoted 6 lines
fb/fbblit.c +4
-0+ fgcolor =grub_video_fb_map_rgba (src->mode_info->fg_red, + src->mode_info->fg_green, + src->mode_info->fg_blue, + src->mode_info->fg_alpha);background color isn't handled correctly (it's not always transparent)
+grub_uint8_tfa, a;
Actually it always 0x00000000. See grub_font_draw_glyph:
there is only FG color in declaration.
Moreover I don't think that bg color is useful because we handle alpha channel correctly for fg and mask itself, so anyone can blit glyph onto everything he want.
Also filling rectangle with color below text and then rendering only fg mask will be way more fast.
But if you insist we should fix grub_font_draw_glyph and all it's callers at first place. How exactly?
Quoted 1 line
Please avoid mixing declarations and code
OK.
Quoted 13 lines · Evgeny Kolesnikov
On Fri, 2010-04-02 at 22:23 +0200, Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 6 lines
grub/fontformat.h +5
-0+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as
STORAGE_FORMATThis byte is already wasted with packed/unpacked bit.
3 bits actually, others as reserved. And I used reserved ones. See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2).
Quoted 5 lines
Quoted 1 line
Also I doubt usefulness of a font in which only some glyphs are anti-aliased. Perhaps we could move antialiasing flags to file header and shave off few bytes?
Yes this makes sense. I.e. substitution glyph for unknown symbol have no AA. Also frames and other geometry can benefit from this. Anyway this byte is already wasted in original spec.
There are only very few graphic characters that actually don't need the antialiasing because they are completely square. Note, however, that even square multiline characters in Chinese fonts can benefit from antialiasing for purpose of line alignment so the only characters that don't are a few box drawings. When the replacement character is a symbol like question tag it can benefit from antialiasing as well.
It is not advised to draw multitude of line characters in graphics mode, plain lines should be used instead so the performance of drawing these characters is not critical to the point that an additional feature should be added to the file format IMHO.
Thanks
Michal
Quoted 10 lines · Evgeny Kolesnikov
Quoted 6 lines · Vladimir 'φ-coder/phcoder' Serbinenko
grub-mkfont.c +2
-3-for (j = font_info->ranges[i *2 ]; j <= font_info->ranges[i *2 +1 ]; - j++) -add_char (font_info, face, j); +for (j = font_info->ranges[i *2 ]; j <= font_info->ranges[i *2 +1 ]; j++) +add_char (font_info, face, j);
Quoted 8 lines
Quoted 3 lines
Can you fix the style of your patch to avoid hunks like these? (Hint:
GNU indent)Most of sources related to font functionality contains awful mix of spaces and tabs. Should I fix this? Strictly use spaces everywhere?
I've run indent on the file in the tree. If you do the same on your tree it should help.
You can also try generating patches with -bB
Quoted 13 lines
Quoted 7 lines
grub/fontformat.h +5
-0+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as
STORAGE_FORMATThis byte is already wasted with packed/unpacked bit.
3 bits actually, others as reserved. And I used reserved ones. See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2).
Well "current" doesn't mean "best possible". I want to know motivation behind this packed/unpacked bit.
Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures.
Quoted 7 lines
Quoted 2 lines
Also I doubt usefulness of a font in which only some glyphs are anti-aliased. Perhaps we could move antialiasing flags to file header and shave off few bytes?
Yes this makes sense. I.e. substitution glyph for unknown symbol have no AA. Also frames and other geometry can benefit from this. Anyway this byte is already wasted in original spec.
We can change the spec and make pff3. Also notice I didn't oppose to glyph in memory having this info, only on disk
Quoted 4 lines
Moreover I thinking about transparent gz or xz reader for font file. This will drastically reduce the size.
You can already gz it.
Quoted 12 lines
Quoted 8 lines
fb/fbblit.c +4
-0+ fgcolor =grub_video_fb_map_rgba (src->mode_info->fg_red, + src->mode_info->fg_green, + src->mode_info->fg_blue, + src->mode_info->fg_alpha);background color isn't handled correctly (it's not always transparent)
+grub_uint8_tfa, a;Actually it always
0x00000000. Seegrub_font_draw_glyph:
there is only FG color in declaration.
Quoted 7 lines
Moreover I don't think that bg color is useful because we handle alpha channel correctly for fg and mask itself, so anyone can blit glyph onto everything he want.
Also filling rectangle with color below text and then rendering only fg mask will be way more fast.
Ok then
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 18 lines · On Fri, 09 Apr 2010 19:54:07 +0200 Vladimir 'φ-coder/phcoder' Serbinenko…
Quoted 17 lines · Evgeny Kolesnikov
Quoted 7 lines · Vladimir 'φ-coder/phcoder' Serbinenko
grub/fontformat.h +5
-0+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as
STORAGE_FORMATThis byte is already wasted with packed/unpacked bit.
3 bits actually, others as reserved. And I used reserved ones. See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2).
Quoted 2 lines
Well "current" doesn't mean "best possible". I want to know motivation behind this packed/unpacked bit.
Certainly I don't claim that PFF2 is the best possible. It was just a first attempt that should be adapted and improved.
Having storage flags for each character may or may not be helpful (we could easily require entire fonts to be either compressed or uncompressed), but that is just how it was initially specified.
I will explain below the motivation behind the idea of "compressed character blocks".
Quoted 4 lines
Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures.
My aim was to make it more practical to have full Unicode fonts of a decent size. Compressing the font would greatly decrease the disk space required, but if the entire font file was compressed using, for instance, GZip, then (generally speaking) the entire file would have to be decompressed to use the font. This would probably make it far too slow to display the GRUB menu when a few fonts were loaded.
In my thoughts on font compression, there are a couple of opposing factors:
- Compressing too little data produces poorer compression since there is less redundancy to eliminate. Consider the extreme case of compressing each glyph by itself with GZip.
- Compressing too much data means that more time is spent decompressing glyphs at runtime that will not be used (in general, a small fraction a Unicode font would be used at once in GRUB). Consider the extreme case of compressing the entire font as a single unit with GZip.
By compressing blocks of characters, where each block contains a number of characters that represents a compromise between too little data for good compression on disk and too much data for wasted time decompressing unused glyphs, good compression and good runtime performance can be attained.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Also I doubt usefulness of a font in which only some glyphs are anti-aliased. Perhaps we could move antialiasing flags to file header and shave off few bytes?
Yes this makes sense. I.e. substitution glyph for unknown symbol have no AA. Also frames and other geometry can benefit from this. Anyway this byte is already wasted in original spec.
Quoted 7 lines
We can change the spec and make pff3. Also notice I didn't oppose to glyph in memory having this info, only on disk
Quoted 4 lines
Moreover I thinking about transparent gz or xz reader for font file. This will drastically reduce the size.
You can already gz it.
How does this perform on full Unicode fonts? When 4 fonts are loaded? On low-end hardware (e.g., 800 MHz VIA C3, Intel Atom, etc.)?
Regards,
Colin
2010/4/9 Colin D Bennett <[email protected]>:
Quoted 59 lines
Quoted 18 lines · On Fri, 09 Apr 2010 19:54:07 +0200 Vladimir 'φ-coder/phcoder' Serbinenko…
Quoted 17 lines · Evgeny Kolesnikov
Quoted 7 lines · Vladimir 'φ-coder/phcoder' Serbinenko
grub/fontformat.h +5
-0+#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32Using entire byte for this is quite a waste. It's better to use 2 or 3 last bit as
STORAGE_FORMATThis byte is already wasted with packed/unpacked bit.
3 bits actually, others as reserved. And I used reserved ones. See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2).Quoted 2 lines
Well "current" doesn't mean "best possible". I want to know motivation behind this packed/unpacked bit.
Certainly I don't claim that PFF2 is the best possible. It was just a first attempt that should be adapted and improved.
Having storage flags for each character may or may not be helpful (we could easily require entire fonts to be either compressed or uncompressed), but that is just how it was initially specified.
I will explain below the motivation behind the idea of "compressed character blocks".
Quoted 4 lines
Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures.
My aim was to make it more practical to have full Unicode fonts of a decent size. Compressing the font would greatly decrease the disk space required, but if the entire font file was compressed using, for instance, GZip, then (generally speaking) the entire file would have to be decompressed to use the font. This would probably make it far too slow to display the GRUB menu when a few fonts were loaded.
In my thoughts on font compression, there are a couple of opposing factors:
- Compressing too little data produces poorer compression since there is less redundancy to eliminate. Consider the extreme case of compressing each glyph by itself with GZip.
- Compressing too much data means that more time is spent decompressing glyphs at runtime that will not be used (in general, a small fraction a Unicode font would be used at once in GRUB). Consider the extreme case of compressing the entire font as a single unit with GZip.
Quoted 5 lines
By compressing blocks of characters, where each block contains a number of characters that represents a compromise between too little data for good compression on disk and too much data for wasted time decompressing unused glyphs, good compression and good runtime performance can be attained.
Isn't gzip already compressed in fixed sized blocks?
I mean what you want is gzip random block access rather than stream access, and it's been already done, at least in Linux cloop.
It is also general enough that it could be used for other files, not only fonts and can work separate of the font system.
Thanks
Michal
Quoted 21 lines
Quoted 6 lines
Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures.
My aim was to make it more practical to have full Unicode fonts of a decent size. Compressing the font would greatly decrease the disk space required, but if the entire font file was compressed using, for instance, GZip, then (generally speaking) the entire file would have to be decompressed to use the font. This would probably make it far too slow to display the GRUB menu when a few fonts were loaded.
In my thoughts on font compression, there are a couple of opposing factors:
- Compressing too little data produces poorer compression since there is less redundancy to eliminate. Consider the extreme case of compressing each glyph by itself with GZip.
Quoted 7 lines
- Compressing too much data means that more time is spent decompressing glyphs at runtime that will not be used (in general, a small fraction a Unicode font would be used at once in GRUB). Consider the extreme case of compressing the entire font as a single unit with GZip.
This issue should be handled at compress time by choosing to compress by blocks of desired size. This way font layer doesn't need to care anymore.
Quoted 6 lines
By compressing blocks of characters, where each block contains a number of characters that represents a compromise between too little data for good compression on disk and too much data for wasted time decompressing unused glyphs, good compression and good runtime performance can be attained.
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 29 lines · On Mon, 12 Apr 2010 09:31:56 +0200 Vladimir 'φ-coder/phcoder' Serbinenko…
Quoted 22 lines
Quoted 6 lines
Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures.
My aim was to make it more practical to have full Unicode fonts of a decent size. Compressing the font would greatly decrease the disk space required, but if the entire font file was compressed using, for instance, GZip, then (generally speaking) the entire file would have to be decompressed to use the font. This would probably make it far too slow to display the GRUB menu when a few fonts were loaded.
In my thoughts on font compression, there are a couple of opposing factors:
- Compressing too little data produces poorer compression since there is less redundancy to eliminate. Consider the extreme case of compressing each glyph by itself with GZip.
Quoted 7 lines
- Compressing too much data means that more time is spent decompressing glyphs at runtime that will not be used (in general, a small fraction a Unicode font would be used at once in GRUB). Consider the extreme case of compressing the entire font as a single unit with GZip.
Quoted 3 lines
This issue should be handled at compress time by choosing to compress by blocks of desired size. This way font layer doesn't need to care anymore.
But can you randomly seek to an block transparently and read it that way?
Regards,
Colin
On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett <[email protected]> wrote
Quoted 6 lines
Quoted 3 lines
This issue should be handled at compress time by choosing to compress by blocks of desired size. This way font layer doesn't need to care anymore.
But can you randomly seek to an block transparently and read it that way?
Maybe not fully randomly, but jumping by blocks will be quite fast even if file was seeked backward when one must start from begining of file(at least with xz). I don't know if jumping block backward is available in gzip, probably not.
If block size would be chosen wisely it should be possible to buffer block (uncompressed) data and there should be quite a big chance that data locality will minimize need for jumping (and decompression). Everything fully transparent for caller. If You add compressed data buffering (sth like compressed_data->bufio->decompressor->decompressed_block_buffer->caller) this should work quite nicely.
As I've mentioned in my post about xz compression, I'll try to propose some sollution fot that in the near future.
Signature · 1 line
Szymon Janc
Quoted 9 lines · Szymon Janc
On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett <[email protected]> wrote
Quoted 6 lines
Quoted 3 lines
This issue should be handled at compress time by choosing to compress by blocks of desired size. This way font layer doesn't need to care anymore.
But can you randomly seek to an block transparently and read it that way?
Quoted 7 lines
Maybe not fully randomly, but jumping by blocks will be quite fast even if file was seeked backward when one must start from begining of file(at least with xz). I don't know if jumping block backward is available in gzip, probably not.
If block size would be chosen wisely it should be possible to buffer block (uncompressed) data and there should be quite a big chance that data locality will minimize need for jumping (and decompression). Everything fully
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Thanks
Michal
Quoted 9 lines · Szymon Janc
On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett <[email protected]> wrote
Quoted 6 lines
Quoted 3 lines
This issue should be handled at compress time by choosing to compress by blocks of desired size. This way font layer doesn't need to care anymore.
But can you randomly seek to an block transparently and read it that way?
Quoted 7 lines
Maybe not fully randomly, but jumping by blocks will be quite fast even if file was seeked backward when one must start from begining of file(at least with xz). I don't know if jumping block backward is available in gzip, probably not.
If block size would be chosen wisely it should be possible to buffer block (uncompressed) data and there should be quite a big chance that data locality will minimize need for jumping (and decompression). Everything fully
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Thanks
Michal
Quoted 5 lines
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Decompressor is stateful so you'll need to save the sate as well which may eat more RAM than decompressing the whole uncompressed file. It also doesn't solve the issue of retrieving e.g. the last character from compressed file without retrieving all preceding ones
Quoted 11 lines
Thanks
Michal
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Dnia poniedziałek 12 kwiecień 2010 o 19:30:00 Vladimir 'φ-coder/phcoder' Serbinenko napisał(a):
Quoted 7 lines
Quoted 2 lines
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Decompressor is stateful so you'll need to save the sate as well which may eat more RAM than decompressing the whole uncompressed file. It also doesn't solve the issue of retrieving e.g. the last character from compressed file without retrieving all preceding ones
I think that Michal was refering to cache already read blocks metadata (which is not a bad idea if file is often seek back and forward).
Signature · 2 lines
Szymon K. Janc [email protected] // GG: 1383435
Quoted 5 lines · Szymon Janc
Dnia poniedziałek 12 kwiecień 2010 o 19:30:00 Vladimir 'φ-coder/phcoder' Serbinenko napisał(a):
Quoted 3 lines
Quoted 2 lines
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Quoted 7 lines
Quoted 4 lines
Decompressor is stateful so you'll need to save the sate as well which may eat more RAM than decompressing the whole uncompressed file. It also doesn't solve the issue of retrieving e.g. the last character from compressed file without retrieving all preceding ones
I think that Michal was refering to cache already read blocks metadata (which is not a bad idea if file is often seek back and forward).
I am not sure we are talking about the same thing here.
Most compression formats don't compress the whole file, they compress only fixed sized parts of the file = blocks. This is because there is a fixed limit on the dictionary size and other technical reasons. The other reason is that if you have a tar archive or something like that it looks differently in different places so applying blanket compression to the whole thing might not be that much of a win anyway.
So you could seek in the file if you knew where these blocks start but they are different size after compression and it is not required to store an index in the compressed file (and probably is not in most) as the next block simply starts after the previous one and you know the previous block ended when you finish decompressing it. However, there is no reason to throw away the information once you obtain it by decompressing some blocks.
I guess there is no more metadata to be gained at this level but you could mean other blocks at some other level.
Thanks
Michal
2010/4/12 Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]>:
Quoted 9 lines
Quoted 5 lines
You can also buffer the block offsets so that you can seek in the part of the file you have seen already.
Decompressor is stateful so you'll need to save the sate as well which may eat more RAM than decompressing the whole uncompressed file. It also doesn't solve the issue of retrieving e.g. the last character from compressed file without retrieving all preceding ones
No, the compressed blocks should be separate. Otherwise they would not be blocks. There is stuff like bzip2recover which would not work otherwise.
And yes, reading the last character from a file is not solved by this but you want ascii characters first and those are at the start so the perceived startup time should be shorter.
Thanks
Michal
Was this the latest version? I wanted to apply this feature but this seems to be latest version but doesn't contain requested corrections.
Quoted 25 lines · Evgeny Kolesnikov
Hello!
Here is improved patch for fonts anti-aliasing. Includes:
1) Optimized blending blitters for 8-bit masks;
2) Absolute compatibility with pf2 format. No PFF3 magic additions.Affected files:
font/font.cinclude/grub/fbblit.hinclude/grub/font.hinclude/grub/fontformat.hinclude/grub/video.hutil/grub-mkfont.cvideo/video.cvideo/fb/fbblit.cvideo/fb/fbutil.cvideo/fb/video_fb.c_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko