[ https://issues.apache.org/jira/browse/FOP-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544286#comment-17544286 ]
Simon Steiner edited comment on FOP-2657 at 5/31/22 10:04 AM: -------------------------------------------------------------- You shouldnt need to use metric files, does it work without them was (Author: ssteiner1): You shouldnt need to use metric files, do it work without them > 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: 2.5 > Reporter: Gustav Andersson > Priority: Major > 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|https://xmlgraphics.apache.org/fop/0.95/fonts.html#truetype-metrics], > 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! -- This message was sent by Atlassian Jira (v8.20.7#820007)