[cairo] [patch] caching, glyph, font, and glyphset patch, round 2

Keith Packard keithp at keithp.com
Fri Oct 8 09:36:28 PDT 2004


Around 22 o'clock on Oct 7, graydon hoare wrote:

> I wondered about this when I saw it in glyph.c, but I decided I'd prefer 
> to see "dead_entry" if I looked in gdb. of course, "0x1" is pretty 
> obvious too. I don't really care. I'll set it to the #define if you like.

Yeah; the #define has the added benefit of segfaulting if you accidentally 
use it.

> ok. in practical terms, does this mean "remove the FIXME comment" or 
> "remove the max_y_advance metric" or ... ?

I think we just need to document it.

> hrm. I'm not sure. istr owen (?) said that there's not often much 
> benefit to it because the hints usually do grid snapping anyways. I 
> don't really have any opinion on the matter. it's doable, for sure; it 
> seems like all we'd need to do is key the glyph cache by a full 2x3 
> affine matrix rather than just a 2x2 one.

heh. You're thinking *way* beyond me at this point.  I just wanted to do 
the LCD optimization so that the existing pixel-aligned text looks good.
This doesn't change how the cache works, it only affects how the glyphs 
are actually rasterized (and quadruples the amount of memory they require).

However, once we do that, we can actually *shift* the text by 1/3 a pixel 
to hit the sub-pixel grid and the glyphs will still look sharp while 
providing 3x the horizontal resolution.  I think this will make it 
possible to set text on the screen closer to printer metrics.  I view this
as a future project as it will triple memory requirements again (after the 
4x expansion for sub-pixel text).

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041008/4571fc92/attachment.pgp


More information about the cairo mailing list