[
https://issues.apache.org/jira/browse/FOP-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836552#comment-17836552
]
João André Gonçalves commented on FOP-3175:
-------------------------------------------
The custom font applies a baseline offset. The ascender is set to 50
_(conversion of the ttf unit to pdf unit)_ * fontSize. This comes from the ttf
file itself. I think the issue here is with the fo:inline as the offset is
applied to it too but looks like it's ignored in the end.
> Wrong baseline for fall-back font Noto Emoji
> --------------------------------------------
>
> Key: FOP-3175
> URL: https://issues.apache.org/jira/browse/FOP-3175
> Project: FOP
> Issue Type: Bug
> Affects Versions: 2.4, 2.6, 2.7, 2.8, 2.9
> Reporter: Alexander Dyuzhev
> Priority: Major
> Attachments: NotoEmoji_Issue.zip, fop.xconf,
> image-2024-04-11-19-51-59-792.png, image-2024-04-11-19-52-19-990.png,
> noto_emoji_test.fo, noto_emoji_test.pdf
>
>
> I have a text with the Emoji glyphs.
> In the fo:root I've set two fonts - Times for the main text and NotoEmoji
> (Google font) for the glyphs which missing in the Times.
> {code:xml}
> font-family="Times, NotoEmoji"
> {code}
> The sample text is very simple:
> {code}
> text ✔ text
> {code}
> The FOP substitutes the 'check mark' glyph from the font NotoEmoji properly,
> but the glyphs shifted up (look like the wrong baseline):
> !image-2024-04-11-19-51-59-792.png!
> I've tried to specify font-selection-strategy="character-by-character" - the
> same result.
> But if I specify the font NotoEmoji explicitly for the 'check mark':
> {code}
> <fo:inline font-family="NotoEmoji">✔</fo:inline>
> {code}
> then 'check mark' glyph renders in the one line with main text:
> !image-2024-04-11-19-52-19-990.png!
> The source .fo: [^noto_emoji_test.fo]
> Font config: [^fop.xconf]
> The resulted PDF: [^noto_emoji_test.pdf]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)