Re: [Podofo-users] font metrics StringWidth() differs from actually width of drawn string

2016-12-01 Thread dennis
Hey, the version is 0.9.4 sorry, i just assumed that if not said specifically everybody would default to the latest release :-) Thank you for your answer. I will take a look at PdfEncodingFactory. In another program that uses 0.9.3 PoDoFo it works fine with the posted code. no monospace, no

Re: [Podofo-users] font metrics StringWidth() differs from actually width of drawn string

2016-12-01 Thread zyx
On Thu, 2016-12-01 at 11:48 +0100, dennis wrote: > font = g_outputDoc->CreateFont(fontName, isBold, isItalic, false, > new PdfIdentityEncoding(0, 0x, true), true); Hi, I wouldn't be surprised if it's due to the PdfIdentityEncoding() use (which you actually leak; consider using PdfEncod

[Podofo-users] font metrics StringWidth() differs from actually width of drawn string

2016-12-01 Thread dennis
Hey all! I am trying to align a multiline text properly. Therefore i create my font like this and set it to my painter: font = g_outputDoc->CreateFont(fontName, isBold, isItalic, false, new PdfIdentityEncoding(0, 0x, true), true); font->SetFontSize(fontSize); g_painter.SetF