#3 Full imbedding TrueType fonts into PDF

closed
nobody
None
5
2011-05-12
2011-05-10
No

I would like to imbedd TrueType and Type1 fonts into the PDF. I saw that you already provide special wrapper classes.

My questions is: Are there already any utility classes who imbedd arbitrary TTF files or do I have to program this part for myself?

Discussion

  • mtraut
    mtraut
    2011-05-10

    Font conversion is available with jPodRenderer in the class "FontConverterCwt2Pdf". This is in the renderer project as there are many dependencies to platform and rendering specifics when dealing with fonts. For example you depend on "Freetype" for parsing the font programs.

    Be aware that jPodRenderer is GPLed.

     
  • Hello.

    I checked the meantioned class from jPodRenderer but I ran into troubles. I produced the following code:

    Face face = new ?
    GenericFont gFont = GenericFont.createNew(new FileLocator("./Rostock.ttf"), );
    FontConverterCwt2Pdf conv = new FontConverterCwt2Pdf(gFont);
    conv.getPdFont()....

    The Face class seems to be a wrapper which stores several contents from the TTF file. But I couldn't find any existing routines who process the font file. Am I right in assuming that I have to implement this code or is there a proper routine in another class?

     
    • status: open --> closed