Hi all, [this was originally written and sent today, 10:31 UTC,
this is a lightly-edited resend] 


On Sun, 2016-05-08 at 17:23 +0000, zyx wrote:> On Fri, 2016-05-06 at 12:20 
+0000, Matthew Brincke wrote:
>> > a) place GetWidthArray() inline into PdfFontSimple::Init()>>
>> your (zyx') point a) is wrong, because (as Josef has posted already) the
>> method PdfFontMetricsFreetype::GetWidthArray calls FT_Load_Char which
>> uses a different encoding from what he'd like to use, and in his patch
>> the index into the Widths array is first transformed according to the
>> encoding of the font object, which isn't done without the patch. AFAIK
>> (guessing here ;-) ) FT_Load_Glyph called by the method the patch calls,
>> 
>> PdfFontMetricsFreetype::GetGlyphWidth( int nGlyphId ), doesn't have this
>> problem.
>
>     Hi,
> aha, I see, I overlooked that GetGlyphWidth() uses FT_Load_Glyph(),
> while GetWidthArray() calls FT_Load_Char() instead. My fault, I'm sorry

> for that.
thanks zyx, apology accepted. :-)

> What about fixing PdfFontMetricsFreetype::GetWidthArray() instead? It
> would make more sense, I believe, and fix more (future) issues at once.

I'm afraid this is impossible without an API change because the font metrics
classes don't have access to the encoding selected for a font object (yet?).
Therefore I think the only way (you'd approve of for this release) is the one
I proposed in e-mail you quoted (but left out that part) to change the doc
comment of the method. Maybe there should also be a mention of the /Widths
array being set correctly according to the selected encoding automatically
(of course only when the earlier change by Josef incl. my advice, is accepted).


>     Bye,
>     zyx

Best regards, mabri

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to