Hi, (guy who implemented ttc support here). The problem is, the std::equal_range function call in pdf fontcache. (or better the constructor of TFontCacheElement)
Meiro for example has a japanese name, thus the pdfstring will be converted into unicode (which is horribly buggy in podofo... with endless loops and such). Look at the CreateFontObject function in PdfFontCache. In there a TFontCacheElement is created. In the GetFont there is an std::equal_range call which uses a constructor of TFontCacheElement (here is the first buggy part). Just create the element beforehand like in CreateFontObject and then do the equal range call with the element (you "skip" the constructor which is buggy for unicode strings). This should fix your problem. If it doesnt you need to wait like 2 weeks xD. I have a patch but its not ready yet... Second buggy part (and that was my mistake...) is in GetFontFromCollection function in pdfFontCache. This needs some more rework. Which is kinda too complicated to describe in an email (patch is in the working dont worry ;D ) The problem is, that we first check the language id against the systemLCID or we check against english. This tends to give problems on systems with languagePacks installed which have a different "character" set then their native installation. (e.g. english system -> Japanese language pack, russian system -> german languagePack etc). Greetings, Dennis Am 29.01.2016 um 15:34 schrieb zyx: > On Fri, 2016-01-29 at 13:29 +0000, Jaseem Ali K T wrote: >> Does PoDoFo support ttc fonts? >> > Hi, > PoDoFo doesn't support fonts, it's the freetype library which operates > with font files. If the freetype library can open a ttc font, then > PoDoFo should not have any issue with it. > > I see that PdfFontFactory::GetFontType() recognizes "ttc" extension and > returns an ePdfFontType_TrueType. The best if you can step with a > debugger and see what exactly failed when you called the CreateFont() > function. > > It can also depend on your version of PoDoFo, which you didn't mention. > The latest stable version is 0.9.3. > Bye, > zyx > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users