[ https://issues.apache.org/jira/browse/FOP-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911675#comment-17911675 ]
Joao Goncalves commented on FOP-3175: ------------------------------------- [~dyuzhev] I spent some more time looking at this. The shift up seems to be the correct behaviour. If you change the font-family attribute on the root element to "NotoEmoji, Times", all the emoji are shifted up. When fop goes through the fonts, it will pick the first one it finds that is valid. It will only use the second font when the character does not exist on said font. This means all the rules for baseline, etc are from the first font. This is what is causing the difference. > 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)