Skip to content

Serve glyph ranges beyond the Basic Multilingual Plane #2366

@1ec5

Description

@1ec5

As of maplibre/maplibre-gl-js#6640, MapLibre GL JS v5.13.0 and above is capable of rendering characters beyond Unicode codepoint U+FFFF (65,535), up to the last codepoint in the Unicode standard at U+10FFFF. However, Martin only serves up ranges through U+FFFF:

/// Maximum Unicode codepoint supported (U+FFFF - Basic Multilingual Plane).
const MAX_UNICODE_CP: usize = 0xFFFF;

Support for non-BMP characters is important for supporting CJKV place names, historic writing systems, and place names in indigenous languages. If the range is unavailable from the server, GL JS falls back to a font from the local environment, such as a system font or a Web font pulled into the webpage using CSS. However, many devices lack the fonts necessary for these codepoints, or the operating system disables these fonts to save memory, or the only available fonts are low-quality pan-Unicode fonts.

If a designer has decided to use server-renderer fonts, Martin could serve any requested range rather than limiting it to the BMP. This should be compatible with other clients, which simply wouldn’t request non-BMP ranges. Eventually, I anticipate that support for alternative font technologies would improve so that this use case would no longer require font resources from Martin, but as long as Martin serves up fonts, it might as well serve them up in full.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions