Skip to content

Vertical variants of glyphs using HarfBuzz #40

Description

@wipfli

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions