[
https://issues.apache.org/jira/browse/FOP-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525722#comment-17525722
]
J Frank commented on FOP-2657:
------------------------------
Can you add font file?
I downloaded font family from google
([https://fonts.google.com/noto/specimen/Noto+Sans)] and extracted it and
gives error. I am on latest version (2.7) of fop
Apr 21, 2022 2:28:58 PM org.apache.fop.fonts.LazyFont load
SEVERE: Failed to read font file NotoSans-Regular.ttf Reached EOF, file
size=15558
java.io.EOFException: Reached EOF, file size=15558
at
org.apache.fop.fonts.truetype.FontFileReader.read(FontFileReader.java:100)
> 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)