Skip to content

Replace fontstack with something prettier and more multilingual #870

Description

@1ec5

In #359, we introduced an “OpenHistorical” family of fontstacks for map labels that pulls in Open Sans for the most common Western scripts and Unifont for everything else. Neither font is particularly attractive. This combination also lacks support for many of the historical scripts that we’re starting to expose in the vector tiles as part of #679. Imagine being able to navigate to Mesopotamia in the Bronze Age and see the names of places in both your language and cuneiform. Stuff like that would be an eye-opener in historical GIS. Unfortunately, our fontstack doesn’t cover cuneiform codepoints, so OpenHistoricalMap/openhistoricalmap-embed#8 draws a blank.

OpenStreetMap Americana used to piggyback off OpenHistorical but quickly outgrew it and created an alternative fontstack and toolchain, fontstack66, based on the Noto project. The various fonts under the Noto umbrella add up to much wider Unicode coverage than Unifont, and they all look pretty attractive compared to Unifont. We could fork fontstack66 and supplement it with the extra Noto fonts we care about, then configure the site to publish that fork alongside the map-styles repository (from which we currently serve up font PBFs).

Any support for historical writing systems would require a change being discussed in maplibre/maplibre-gl-js#4550 to request glyph PBFs for codepages above U+FFFF.

Activity

  1. 1ec5 commented on Aug 13, 2024

    @1ec5
    MemberAuthor

    We could fork fontstack66 and supplement it with the extra Noto fonts we care about

    The default configuration already includes some non-BMP codepoint ranges, but we’d need to add some more fonts like Noto Anatolian Hieroglyphs and Noto Cuneiform that probably wouldn’t make a ton of sense for OSM Americana to serve from their domain. After adding the fonts to the configuration, we’d configure GitHub Pages to publish to openhistoricalmap.org similar to how the map-styles repository gets published. Apart from that, I don’t anticipate needing to manage a fork as part of the main deployment process. It would be the same level of maintenance overhead as openhistoricalmap-embed, if not less.

  2. added theissue type on Mar 16, 2025
  3. added
    internationalization
    and removed on Mar 17, 2025
  4. 1ec5 commented on Jan 22, 2026

    @1ec5
    MemberAuthor

    Unfortunately, our fontstack doesn’t cover cuneiform codepoints, so OpenHistoricalMap/openhistoricalmap-embed#8 draws a blank.

    MapLibre GL JS implemented font substitution in maplibre/maplibre-gl-js#4564, so codepoints missing from the fontstack automatically show up in a system font, just like ordinary HTML text.

    This change also gives us some additional options that would be easier to maintain. If we remove the glyphs property from each stylesheet, MapLibre will automatically fall back to a sans-serif system font for all text, eliminating the unsightly Unifont glyphs. We can tweak text-font properties to list some commonly installed fonts, to influence the browser’s font selection further. For example, if we like the choice of Open Sans from OpenHistoricalMap/ohm-website#88, then we can set text-font to Open Sans and Open Sans Italic.

    If we want to ensure that everyone continues to see Latin text in Open Sans, even if it isn’t installed locally, then we could host a copy of Open Sans as a Web font. ohm-website would specify this font in a CSS stylesheet.

    MapLibre still requires glyphs on Android and iOS: maplibre/maplibre-native#165. If we remove glyphs, labels will disappear. As a temporary workaround, we can set the font-faces property to TrueType fonts for Open Sans and Unifont.

  5. jeffreyameyer commented on Jun 2, 2026

    @jeffreyameyer
    Member

    @1ec5 - has suggested just dropping our current fontstack in order to improve our current rendering of a variety of less common language labels and better unicode support.

    @erictheise - any thoughts here?

    If we drop the fontstack:

    So, dropping the stack seems very appealing, in spite of possible iOS & Android MapLibre issues, which are low pri.

  6. removed their assignment
    on Jun 2, 2026
  7. erictheise commented on Jun 2, 2026

    @erictheise
    Contributor

    @1ec5 - has suggested just dropping our current fontstack in order to improve our current rendering of a variety of less common language labels and better unicode support.

    @erictheise - any thoughts here?

    Martin creates glyphs from font files on the fly. That's one of its most appealing features and I use it extensively in my performances for the don't-worry-about-it and flexibility it offers. It makes it very easy to prototype candidate fonts.

  8. 1ec5 commented on Jun 2, 2026

    @1ec5
    MemberAuthor

    That’s fine if we have fonts we think are suitable. As it stands, our fontstack only really supports Latin, Cyrillic, and Greek; anything else is hardly readable Unifont. We can investigate a nicer font selection, but in the meantime, we could stop the bleeding by changing the stylesheet to no longer refer to the fontstack at all, instead relying on system fonts. Having the right fonts becomes a user problem, and fortunately most systems have better coverage than the Open Sans portion of our fontstack. If we need to preserve native Android/iOS support, we can specify a TrueType font for those platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    internationalizationstylesheets

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions