rmkit-dev / rmkit

| remarkable app framework | https://rmkit.dev
https://build.rmkit.dev
365 stars 32 forks source link

[rmkit] Add font fallback support to rmkit.h #204

Open granolaonicecream opened 1 year ago

granolaonicecream commented 1 year ago

Feature Request

Font fallback is a strategy of selecting the font used to render a glyph. This is typically accomplished by defining an ordered list of fonts, and iterating through them until a supported font is found for each glyph.

Purpose

Current font formats like TTF cannot represent enough total symbols to cover all languages. This improvement would allow applications to display text from a wider variety of languages (e.g. CJK languages) simultaneously.

Approach

Currently, rmkit appears to support a single configurable font.

The backing stb library does advertise the ability to check a font for support of a codepoint.

raisjn commented 1 year ago

great idea, thank you!

raisjn commented 10 months ago

i'm coming back to this task and thinking about it. would using a comma separated list of fonts work?