Hello, I can confirm that "Courier" cannot be loaded as a font on Windows. "Courier New" works. I think plain "Courier" is no truetype font and that is why you cannot use it.
PoDoFo returns NULL correctly on my system using latest SVN when I try to
load "courier". That is a correct behaviour. So I cannot reproduce your
crash. Is it possible that you have an older version of PdfFontCache.cpp? I
can remember that a check for NULL pointers was missing somewhere. This could
explain your crash.
reagards,
Dom
Am Mittwoch, 14. Mai 2008 schrieb EXTERNAL Loch Sebastian (Firma Ferchau;
BhP/TEF17):
> Hello all,
>
> the program crashes when calling CreateFont
> on a PdfDocument for Courier on Windows XP.
>
> >podofo.dll!PoDoFo::PdfFontMetrics::InitFromFace() Zeile 159 + 0x6
>
> C++
>
> >podofo.dll!PoDoFo::PdfFontMetrics::PdfFontMetrics(FT_LibraryRec_ * *
>
> pLibrary=0x0012fbac, const char * pszFilename=0x0012f978) Zeile 83
> C++
>
> >podofo.dll!PoDoFo::PdfFontCache::GetFont(const char *
>
> pszFontName=0x00411224, bool bEmbedd=true) Zeile 115 + 0x3c C++
>
> >podofo.dll!PoDoFo::PdfDocument::CreateFont(const char *
>
> pszFontName=0x00411224, bool bEmbedd=true) Zeile 253 C++
>
> The method GetDataFromLPFont returns false as the call to GetFontData
> raises an GDI_ERROR. When reading the first 256 widht entries into the
> cache in the InitFromFace method the program crashes in this for loop
> when reaching index 31.
> E.g. if we use the Arial font everything works fine!
>
> Any ideas?
>
> Furthermore is it possible to calculate the widht of a PdfString in pdf
> units?
>
> Regards
> Sebastian
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
--
**********************************************************************
Dominik Seichter - [EMAIL PROTECTED]
KRename - http://www.krename.net - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
