Open luojinrong opened 2 years ago
Might it be that hieroglyph is using different font and different offset from baseline?
Might it be that hieroglyph is using different font and different offset from baseline?
But I use the same font file, how can this happen?
Good question! Technically, fonts can provide different metrics (baseline, ascend, descend) for diffrent OSes.
From https://www.maxkohler.com/posts/2022-02-19-fixing-vertical-metrics/
For historical reasons, vertical metrics are stored in three different places (called hhea, OS/2 typo and OS/2 win), and different rendering engines get their information from different ones. Apple devices generally use hhea, Windows uses either OS/2 typo or OS/2 win, and old versions of MS Office use OS/2 win exclusively. If the numbers in these tables aren’t the same, you can end up in a situation where type renders differently in different browsers, design tools, or operating systems.
I wonder if that’s the case here. You can try using something like this https://github.com/source-foundry/font-line to print the metrics (but be sure to figure out which exact font is used for rendering first)
Thank you for helping me find this article. Although I modified ascent and percent in OS/2 according to the method in the article, it still doesn't work.
However, I found the each emoji has a offsetY argument in the TTX file, and realized the alignment by modifying this. 😄
When I draw text with emoji together on Paragraph,I find bottom alignment of emoji and text is fine on mac,but not on linux.
on mac:
on linux:
I would like to know what is causing this and how to make it behave the same on linux as it does on mac.
ps. I use the same font(AppleColorEmoji.ttc on mac) on both two system.