Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

glyph overlap in Segoe UI Emoji #12

Closed
emojifreak opened this issue Aug 14, 2019 · 6 comments
Closed

glyph overlap in Segoe UI Emoji #12

emojifreak opened this issue Aug 14, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@emojifreak
Copy link

\documentclass{article}
\usepackage{harfload}
\usepackage{fontspec}

\begin{document}
\Huge
\noindent
\fontspec{Segoe UI Emoji}[RawFeature={mode=harf}]
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦β°β°\\
\fontspec{Noto Color Emoji}[RawFeature={mode=harf}]
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦β°β°
\end{document}

When I process the above file with harflatex 0.40 installed from TeXLive Contrib, I get
emoji4
We see that the glyphs in Segoe UI Emoji are overlapping. I doubt if this is an intended behavior. The generated PDF is attached below.
emoji4.pdf

@khaledhosny
Copy link
Owner

Is this a regression, did you get proper spacing before?

@emojifreak
Copy link
Author

@khaledhosny Thank you for your reply.
No, I believe it is NOT a regression. I have seen it before but did not see it as something to be reported. Moreover, mode=node and lualatex also give almost the same (improper) spacing with the black-and-white version of Segoe UI Emoji. Below is the result with mode=node. I am sorry if this is a bug (or a feature) of the font.
Screenshot at 2019-08-15 04-17-37

@khaledhosny
Copy link
Owner

khaledhosny commented Aug 14, 2019

Looks like a HarfBuzz issue. I can reproduce the bad spacing with other HarfBuzz applications, but not with Apple’s TextEdit. Can you check on Windows whether applications like Notepad, Wordpad and MS Word handle this correctly?

The font has a dist feature and seems to expect it to be tutned on by default, but HarfBuzz only enables it by default for certain scripts only. Enabling it manually fixes the spacing:

\fontspec{Segoe UI Emoji}[RawFeature={mode=harf,dist}]

@emojifreak
Copy link
Author

@khaledhosny Windows Notepad and Microsoft Word make correct spacing, i.e., two spacing among three glyph are the same in Segoe UI Emoji. Firefox on Windows make incorrect spacing, as expected.

@khaledhosny
Copy link
Owner

Thanks, this will be fixed in HarfBuzz.

@khaledhosny khaledhosny added the bug Something isn't working label Aug 15, 2019
@khaledhosny
Copy link
Owner

Fixed with 5645b9f.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants