Add Thai notification rendering with GPOS anchors - #1937
Open
ninefyi wants to merge 4 commits into
Open
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>
Add Thai combining-mark classification, GPOS anchor extraction, PBF tooling, runtime positioning, and focused tests. Document the font-unit payload contract and add the Thai translation source and Sarabun font configuration. Physical PT2 validation remains partial. The sequences กี่ and สี่เหลี่ยม still show tone-mark overlap. Co-Authored-By: GitHub Copilot <noreply@github.com> Signed-off-by: Piti Champeethong <piti_fee@hotmail.com>
Enable Thai locale strings and GPOS anchor extraction for Sarabun notification fonts. Keep month-specific resources outside this notification-focused change. Co-Authored-By: GitHub Copilot <noreply@github.com> Signed-off-by: Piti Champeethong <piti_fee@hotmail.com>
Apply Ruff formatting to the Thai GPOS font generator and PBF extractor. Co-Authored-By: GitHub Copilot <noreply@github.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
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 locale resources and GPOS-based combining-mark positioning for Sarabun bitmap fonts in notifications.
The implementation stores sparse GPOS anchor metadata in PBF font resources, scales font-unit offsets at runtime, and preserves fallback behavior for fonts or anchors without metadata.
Validation
./pbl test -M test_text_renderpasses.qemu_emeryfirmware build passes.obelix@pvtslot 0 and slot 1 firmware builds pass.Known limitation
The sequences
กี่andสี่เหลี่ยมstill show tone-mark overlap on physical PT2. This PR does not claim complete Thai mark positioning for every combining-mark sequence.Scope
This change is focused on Thai notification rendering and locale resources. Generated firmware bundles, local planning files, backups, and month-resource experiments are excluded.
Contributor checks