[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] A possible fix for FT_GlyphSlot_Embolden() regarding advance
From: |
Zhe Su |
Subject: |
[ft-devel] A possible fix for FT_GlyphSlot_Embolden() regarding advance handling. |
Date: |
Thu, 2 Nov 2006 19:34:57 +0800 |
Hi,
In freetype 2.2.x's FT_GlyphSlot_Embolden(), the following piece of
code handles slot->advance:
FT_EXPORT_DEF( void )
FT_GlyphSlot_Embolden( FT_GlyphSlot slot )
{
...
/* assume the layout is horizontal */
slot->advance.x += xstr;
...
}
You can see that there is a comment: "assume the layout is
horizontal". So this piece of code can't handle vertical layout
correctly. I think the possible fix should be:
...
if (slot->advance.x)
slot->advance.x += xstr;
if (slot->advance.y)
slot->advance.y += ystr;
...
Because for horizontal layout, advance.y is always zero, vice versa.
How do you think about it?
Regards
James Su
freetype-fix-embolden-advance-handling.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ft-devel] A possible fix for FT_GlyphSlot_Embolden() regarding advance handling.,
Zhe Su <=