On 15/09/2014 02:27, zyx wrote:
> thanks for the patch. I committed it as r1664:
> http://sourceforge.net/p/podofo/code/1664

Thanks for this. There is still something wrong with PdfPainter::DrawGlyph but 
I am not sure how to fix it; in particular this line:

PdfFont* pGlyphFont = pDocument->CreateDuplicateFontType1( m_pFont, "Glyph1" );

(a) looks Type1 specific when there's no guarantee that Type1 fonts are being 
used, and
(b) certainly allocates a massive amount of memory when Type1 fonts are not 
being used. (It creates a new font for every call to DrawGlyph, and I'm 
calling it a lot.)

If I change it to the (obviously incorrect)

PdfFont* pGlyphFont = m_pFont;

then there is no loss of functionality for me and no memory growth when using 
TTF fonts. However, it obviously forces the font into difference encoding. I 
don't know what the implications of that are because I'm only using fonts via 
DrawGlyph.

Does there need to be a CreateDuplicateFontTTF?


------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to