Gustav Andersson updated FOP-2657:
    Attachment: output.pdf

> Certain custom fonts are shifted 'up' in the PDF due to wrong ascender metric
> -----------------------------------------------------------------------------
>                 Key: FOP-2657
>                 URL: https://issues.apache.org/jira/browse/FOP-2657
>             Project: FOP
>          Issue Type: Bug
>          Components: font/unqualified
>    Affects Versions: trunk
>            Reporter: Gustav Andersson
>         Attachments: FOPconfig.xml, NotoNaskhArabic-Regular.xml, 
> NotoSans-Regular.xml, NotoSansSymbols-Regular.xml, input.fo, output.pdf
> 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:
> # Download the 
> [NotoSans-Regular.ttf|https://www.google.com/get/noto/#sans-lgc], 
> [NotoNaskhArabic-Regular.ttf|https://www.google.com/get/noto/#naskh-arab] and 
> [NotoSansSymbols-Regular.ttf|https://www.google.com/get/noto/#sans-zsym] font 
> files and put in a folder.
> # Download the attached [^input.fo], [^FOPconfig.xml], 
> [^NotoSans-Regular.xml], [^NotoNaskhArabic-Regular.xml] and 
> [^NotoSansSymbols-Regular.xml] and put them in the same folder.
> # Run {{fop -c FOPconfig.xml input.fo output.pdf}}
> # 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.ttf and NotoSansSymbols-Regular.ttf 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!

This message was sent by Atlassian JIRA

Reply via email to