[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] sub-glyph graphics-state question
From: |
Dakai Liu |
Subject: |
Re: [ft] sub-glyph graphics-state question |
Date: |
Thu, 27 Oct 2011 17:19:11 +1100 |
Dear Mr. Lemberg,
Thanks for the suggestion. The flip switch, I am auto_flip in the graphics
state, which is not reset before each rendering
of sub-glyphs. Actually I have copy and inserted a code snippet from ver 2.4.6:
/* Reset graphics state */
loader->exec->GS = ((TT_SIZE)loader->size)->GS;
into function: TT_Process_Simple_Glyph()
just before the if statement: if (n_ins > 0) ... , which I think is to execute
the sub-glyphs' byte code.
This seems do the trick, and only affects Simbraille and some middle european
fonts. What do you think of the hack?
Regards,
Dakai
________________________________________
From: Werner LEMBERG address@hidden
Sent: Thursday, October 27, 2011 4:52 AM
To: Dakai Liu
Cc: address@hidden
Subject: Re: [ft] sub-glyph graphics-state question
> I encountered a bug rendering a font called SimBraille.
I don't know this font!
> This font contains sub-glyphs, and the true glyph is assembled by
> selecting those sub glyphs.
>
> The problem is in each and every of the sub-glyph, the flip switch
> is turned off at some point, and the flip flag stayed in graphics
> state for all the subsequent sub-glyph rendering, which results in
> incorrect hinting.
What do you mean with `flip' switch?
> the flip switch is turned on in the beginning of "prep" code. So my
> question is, should I restore this flag before each of the sub-glyph
> being interpreted?
Data of the `prep' table gets executed only if the font size (or the
rendering mode) changes.
> I think this bug is fixed by later versions of freetype library,
> however, unfortunately I am [not] allowed to port the later version
> into our product due to management decision.
I suggest to access the git repository of FreeType, using `git bisect'
to find out which commit fixes your problem so that you can manually
apply it.
Werner
This message is for the named person's use only. It may contain confidential,
proprietary or legally privileged information. No confidentiality or privilege
is waived or lost by any mis-transmission. If you receive this message in
error, please immediately delete it and all copies of it from your system,
destroy any hard copies of it and notify the sender. You must not, directly
or indirectly, use, disclose, distribute, print, or copy any part of this
message if you are not the intended recipient. Toshiba Australia reserves the
right to monitor all e-mail communications through its networks. Thank You."