HOWEVER, that OTF support is a FULL EMBED - you can't subset that way - and 
it's really deisgned for form field usage.

If you are just using the OTF for content (eg. regular text), then PoDoFo needs 
to be modified to "split the OTF apart" into it TTF or T1 origins and process 
it accordingly from there.

Leonard

-----Original Message-----
From: Dominik Seichter [mailto:[email protected]] 
Sent: Wednesday, December 31, 2008 10:55 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Podofo-users] otf font support, linux

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
**********************************************************************

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

Reply via email to