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

Vertical variants of glyphs using HarfBuzz #40

Open
wipfli opened this issue Dec 25, 2024 · 0 comments
Open

Vertical variants of glyphs using HarfBuzz #40

wipfli opened this issue Dec 25, 2024 · 0 comments

Comments

@wipfli
Copy link

wipfli commented Dec 25, 2024

Some Japanese characters like for example the Long Vowel Mark "ー" U+30FC https://www.compart.com/en/unicode/U+30FC have different appearance for horizontal and vertical text layout.

Instead of getting glyph indices with FreeType for a given character in

https://github.com/maplibre/font-maker/blob/main/main.cpp#L21

We could use HarfBuzz with direction set to top-to-bottom. I tried this with the cli tool of harfbuzz and found it indeed returns different glyphs:

hb-shape NotoSansJP-Regular.ttf "ー" 
[gid1387=0+1000]

hb-shape --direction=ttb NotoSansJP-Regular.ttf "ー"
[gid17662=0@-500,-880+0,-1000]

Motivated by maplibre/maplibre-gl-js#5259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant