Conversation
ninefyi
force-pushed
the
add-thai-locale-th-TH
branch
3 times, most recently
from
August 26, 2026 23:27
6f39461 to
fc6cdb1
Compare
Add font and codepoint resources for a new Thai (th_TH) locale, following the existing ar_SA/he_IL pattern: - thai_codepoints.json: the 87 assigned Thai Unicode codepoints (U+0E01-U+0E3A, U+0E3F-U+0E5B). Thai-only, no Latin/ASCII, matching arabic_codepoints.json's precedent -- mixed-script text falls back to the system Latin font via the existing depth-1 fallback chain in text_resources.c. - lang_map.json: GOTHIC_14/18/24/28/36 (+ bold) EXTENDED font entries at the same pixel heights as ar_SA, built from Sarabun. BITHAM/ ROBOTO/DROID_SERIF display fonts left empty, unchanged from base, same as other non-Latin locales. - Sarabun-Regular.ttf / Sarabun-Bold.ttf (SIL OFL 1.1, see LICENSE): static per-weight files, needed because Noto Sans Thai on Google Fonts ships only as a variable-weight font incompatible with this pipeline's per-weight static file expectation. Verified via `./pbl pack_lang --lang=th_TH`: all 10 font resources build cleanly with zero glyph errors across the full codepoint set. Strings (tintin.po) intentionally not included -- translation is planned to go through Crowdin per CONTRIBUTING.md, not this PR. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Piti Champeethong <piti_fee@hotmail.com>
ninefyi
force-pushed
the
add-thai-locale-th-TH
branch
from
August 29, 2026 00:20
ae28efc to
96701f9
Compare
ninefyi
force-pushed
the
add-thai-locale-th-TH
branch
from
September 8, 2026 13:17
96701f9 to
4cec532
Compare
Author
|
Context and open questions for this PR are in #2046 — in particular whether |
Member
|
@jplexer pls check since you've been changing languages stuff recently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Thai (
th_TH) as a new locale, following the pattern of the existingar_SA/he_IL/zh_CNlocales. Font resources only — no firmware ortooling changes.
thai_codepoints.json— the 87 assigned Thai Unicode codepoints(U+0E01–U+0E3A, U+0E3F–U+0E5B). Thai-only, mirroring
arabic_codepoints.json:mixed-script text falls back to the base Latin font via the existing depth-1
fallback in
text_resources.c.lang_map.json—GOTHIC_14/18/24/28/36(+bold)EXTENDEDentries at the samepixel heights
ar_SAuses.BITHAM/ROBOTO/DROID_SERIFleft unchanged.Sarabun-Regular.ttf/Sarabun-Bold.ttf+LICENSE(SIL OFL 1.1). Staticper-weight files are required because Noto Sans Thai now ships only as a
variable font, which this pipeline cannot consume.
Translations are intentionally not included
Per
CONTRIBUTING.md, translated text is not submitted through pull requests.lang_map.jsontherefore setsstrings.file: ""and ships fonts only, asar_SAdoes. Thai strings should flow through Crowdin once
th_THis enabled there.This does not prevent Thai from being useful: notification content arrives from the
phone and is rendered by these fonts, independent of the UI string catalog. Verified
by installing a fonts-only pack (
strings.file: "") and sending a Thai notification —it renders and wraps correctly. Only system UI labels remain English until
translations land.
Validation
./pbl pack_lang --lang=th_THbuilds all 10 font variants across the full87-codepoint set with zero glyph errors.
MAX_FONT_GLYPH_SIZElimits: fits within256 B (flint/diorite/chalk/basalt/aplite) as well as 512 B (emery/gabbro).
qemu_emery(Pebble Time 2)qemu_flint(Pebble 2 Duo — 256 B glyph limit, 1-bit display)qemu_gabbro(Pebble Round 2 — round display / perimeter text path)without U+200B the layout engine breaks mid-syllable and hyphenates; with U+200B at
word boundaries it breaks cleanly. No overflow or clipping in either case.
15:30) renders correctly with no wildcardglyphs.
confirmed on physical Pebble Time 2.
Known limitation
On physical PT2, the sequences
กี่andสี่เหลี่ยมshow tone-mark overlap. Thisrenderer applies no OpenType mark positioning — glyphs are placed purely by the
font's own advance metrics — so mark placement depends entirely on the font. Most
sequences tested (including tall-ascender cases such as
ปิดเครื่องandเปิดใช้ด่วน) render cleanly; these two do not.This PR does not claim complete Thai mark positioning for every combining sequence.
Addressing it properly means either a different font or mark-positioning support in
the renderer, which is out of scope here and better discussed separately.
Contributor checks