Hi,
I am having trouble using a custom FT_Face with PdfFont:
...
FT_Face face;
FT_New_Face( document.GetFontLibrary(), "DejaVuSans.ttf", 0, &face );
font = document.CreateFont( face );
CreateFont tries to embed the font, but the filename that it tries to open is
empty.
Backtrace of the throw:
#0 __cxa_throw (obj=0x980d1d0, tinfo=0xf7f7bc60, dest=0xf7e1c09c <~PdfError>)
at ../../../../gcc-4.4.1/libstdc++-v3/libsupc++/eh_throw.cc:68
#1 0xf7e717d7 in PdfFileInputStream (this=0xffbb7888, pszFilename=0x804df80 "")
at podofo/src/PdfInputStream.cpp:37
#2 0xf7e55021 in PoDoFo::PdfFontTrueType::EmbedFontFile (this=0x98195f0,
pDescriptor=0x980c2d8)
at podofo/src/PdfFontTrueType.cpp:76
#3 0xf7e5338b in PoDoFo::PdfFontSimple::Init (this=0x98195f0, bEmbed=true,
rssubty...@0xffbb7e54)
at podofo/src/PdfFontSimple.cpp:92
#4 0xf7e54c3b in PdfFontTrueType (this=0x98195f0, pMetrics=0x9819468,
pEncoding=0x9817540, pParent=0x9809d28,
bEmbed=true) at podofo/src/PdfFontTrueType.cpp:35
#5 0xf7e51baa in PoDoFo::PdfFontFactory::CreateFontForType
(eType=PoDoFo::ePdfFontType_TrueType,
pMetrics=0x9819468, pEncoding=0x9817540, bEmbed=true, pParent=0x9809d28)
at podofo/src/PdfFontFactory.cpp:105
#6 0xf7e51950 in PoDoFo::PdfFontFactory::CreateFontObject (pMetrics=0x9819468,
nFlags=1, pEncoding=0x9817540,
pParent=0x9809d28) at podofo/src/PdfFontFactory.cpp:46
#7 0xf7e3cbf1 in PoDoFo::PdfFontCache::CreateFontObject (this=0x9809ce4,
itSorted=
{<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0x9809cf0,
_M_version = 1, _M_prior = 0x0, _M_next = 0xffbb8034}, _M_current = {_M_current
= 0x0}}, rveccontain...@0x9809ce4, pMetrics=0x9819468, bEmbedd=true,
bBold=false, bItalic=false, pszFontName=0x98193fc "DejaVuSans",
pEncoding=0x9817540)
at podofo/src/PdfFontCache.cpp:617
#8 0xf7e3bb77 in PoDoFo::PdfFontCache::GetFont (this=0x9809ce4,
face=0x9818b88, bEmbedd=true, pEncoding=0x9817540)
at podofo/src/PdfFontCache.cpp:307
#9 0xf7e0a7e8 in PoDoFo::PdfDocument::CreateFont (this=0x9809ce0,
face=0x9818b88, pEncoding=0x9817540,
bEmbedd=true) at podofo/src/PdfDocument.cpp:211
Please note that the error handling seems to be broken. Continuing after the
throw results in
a SEGV in PdfFontFactory::CreateFontObject:
PdfFontFactory:78 delete pMetrics;
The only option I see is to disable embedding in the call to CreateFont.
But how can I use a custom FT_Face and embedding together? I can provide the
filename of the font if necessary.
Thanks,
Jörg
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users