Hi Ian,

PDF supports OTF fonts directly since PDF 1.6. 

It should be pretty simple to add OpenType support to PoDoFo. The PDFReference 
chapter 5.8 contains the relevant information.

To sum the necessary changes up, you will most likely have to:

.. create a subclass PdfFontOpenType from PdfFontSimple analogus to the 
existing class PdfFontTrueType.
* This class has to call PdfSimpleFont::Init with PdfName("OpenType") as 
parameter instead of TrueType
* Use FontFile3 instead of FontFile2 as this tells any PDF reader that 
OpenType data is embedded instead of TrueType data.

... adapt PdfFontFactory to create a PdfFontOpenType if necessary

... extend PdfFontMetrics::SetFontTypeFromFilename to detect OTF Fonts by 
extension.

I hope this easy steps will help you.

best regards,
        Dom

Am Dienstag, 30. Dezember 2008 schrieb [email protected]:
> Dear PoDoFo users/developers,
>
> On a Linux RHEL4_x64 machine, I am finding problems with font import.
>
> uname -a: Linux box1 2.6.9-42.EL #1 Wed Jul 12 23:15:20 EDT 2006 x86_64
> x86_64 x86_64 GNU/Linux
> g++ (GCC) 3.4.2
>
> DEBUG: Warning: Unrecognized FontFormat:
> /usr/X11R6/lib/X11/fonts/OTF/SyrCOMNisibinOutline.otf
> The font format is unknown. Fontname: EstrangeloNisibinOutline
>
> I notice in PdfFontMetrics.cpp:1275
> PdfFontMetrics::SetFontTypeFromFilename()
>
> that only fonts of extension "ttf", "pfa", "pfb" are allowed,
> so the above .otf font throws the error.
>
> What is the story behind .otf font support?
> Any suggestions for work-around are very much appreciated!
>
> Thanks, Ian
>
>
> ---------------------------------------------------------------------------
>--- _______________________________________________
> 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
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to