Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Putting side-to-side things shaped with different shapers causes spaces to be lost or to have a reversed effect #186

Closed
callegar opened this issue May 11, 2021 · 2 comments
Assignees
Labels
bug Something isn't working fixed in dev already fixed

Comments

@callegar
Copy link

In response to a suggestion provided in bug #185, I am now trying to use the harf shaper for parts of the text using a font that employs PUA-A and PUA-B to avoid their codepoints to be changed.

Unfortunately, mixing the harf and the node renderer seems to have nasty effects.

Consider this bit of code

\documentclass{article}
\usepackage{fontspec}
\newfontface\MDI{Material Design Icons}[Renderer=HarfBuzz]

\begin{document}
Look at this character {\MDI \char"F1372}~test.
\end{document}

the compiled PDF appears to be broken because the symbol U+F1372 ends up overlapping onto the "t" of test rather than being spaced from it because of the ~. In fact, the ~ appears to have the opposite effect than it should, causing the overlap, where without it you would have the two things just placed side to side. The more ~s you add, e.g. as in ~~~~~~~~test the more you end up shifting the "test" word to the left to the point that you can make it overlap with "character" as well. Using a regular space \ rather than ~ has the very same outcome.

@callegar callegar changed the title Putting side-to-side things shaped with a different shaper causes spaces to be lost Putting side-to-side things shaped with different shapers causes spaces to be lost May 11, 2021
@callegar callegar changed the title Putting side-to-side things shaped with different shapers causes spaces to be lost Putting side-to-side things shaped with different shapers causes spaces to be lost or to have a reversed effect May 11, 2021
@zauguin zauguin self-assigned this May 11, 2021
@zauguin zauguin added the bug Something isn't working label May 11, 2021
@zauguin
Copy link
Member

zauguin commented May 12, 2021

This should be fixed in dev.

@callegar
Copy link
Author

As a workaround, until this is released, boxing the material works (though it is really only applicable when you have just a word to be typeset with the different shaper).

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

No branches or pull requests

2 participants