Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2657

Certain custom fonts are shifted 'up' in the PDF due to wrong ascender metric

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5
    • None
    • font/unqualified
    • None

    Description

      Certain fonts are shifted 'up' in the PDFs. I've noticed this in the Google Noto Symbol and Naskh Arabic fonts, but not in the standard Google Noto Sans font.

      If I generate the metric XML file for the three fonts, and copy the value of the <ascender> and <descender> element from the Noto Sans font to the metric files generated for the Symbol and Naskh Arabic fonts, those two fonts are then 'fixed' and appear in the correct place again.

      (Not that the Naskh Arabic font is overflowing its line at the bottom, so there is still something wrong there, but a lot better.)

      To reproduce:

      1. Download the NotoSans-Regular.ttf, NotoNaskhArabic-Regular.ttf and NotoSansSymbols-Regular.ttf font files and put in a folder.
      2. Download the attached input.fo, FOPconfig.xml, NotoSans-Regular.xml, NotoNaskhArabic-Regular.xml and NotoSansSymbols-Regular.xml and put them in the same folder.
      3. Run fop -c FOPconfig.xml input.fo output.pdf
      4. The output should look like the attached output.pdf file, showing the issue.

      The three metric XML files were generated using the instructions on the Apache FOP Confgiuration page, and I then edited the NotoNaskhArabic-Regular.xml and NotoSansSymbols-Regular.xml by overwriting the <ascender> and <descender> elements with those found in the NotoSans-Regular.xml. Note that I don't know anything about the metric files, so I don't know if editing those elements were the correct thing to do, or even what they mean!

      Attachments

        1. output.pdf
          30 kB
          Gustav Andersson
        2. NotoSansSymbols-Regular.xml
          320 kB
          Gustav Andersson
        3. NotoSans-Regular.xml
          151 kB
          Gustav Andersson
        4. NotoNaskhArabic-Regular.xml
          105 kB
          Gustav Andersson
        5. input.fo
          1 kB
          Gustav Andersson
        6. FOPconfig.xml
          1 kB
          Gustav Andersson

        Activity

          People

            Unassigned Unassigned
            Parakoos Gustav Andersson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: