glyphs: Greek-range invariant test keeps R7 green for onboarding Greece #175
No reviewers
Labels
No labels
blocked
claude-wip
map-report
map:is
map:se
needs-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
art/ismap!175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-173-greece-glyphs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Greece glyphs: keep R7 green with a Greek-range invariant test
Closes #173.
What and why
Greece is the first non-Latin country to onboard (issue #44/#172), so R7 — "verify glyph
coverage before onboarding" — becomes a real go/no-go rather than a formality. The embedded
Go font was already de-risked (the modern-Greek block U+0370-03FF is present, including the
tonos vowels modern place names use). This change turns that one-off inspection into the
test that keeps it green, so a future font replacement cannot silently drop Greek.
Changes
mapsrv/glyph_check_test.go—TestGreekGlyphInvariants, mirroring the existingASCII
TestSupersampledGlyphInvariantsexactly: generate the range starting at 0x300(which carries U+0370-03FF) with the real
NewGenerator(), and for each neededcodepoint assert (a) a correctly-sized bitmap (the
(w+6)(h+6)SDF-buffer invariant),(b) a full gradient (
min ≤ 64,max ≥ 192— deep inside to deep outside), and(c) a smooth field (
maxAdjStep ≤ 64— no hard edge, so the downsampling is working).The codepoints asserted are the modern-Greek set Greek names actually use: the seven
tonos vowels U+03AC-03CE (ά έ ή ί ό ύ ώ) and the capitals Σ/Α/Ω/Π/Ρ.
docs/country-requirements.md— R7's example now names Greece as the firstnon-Latin case, cites the test, and adds a
*Check:*line pointing at it.Verification
Unit test —
go test -run TestGreekGlyphInvariants ./mapsrv/passes: all 12 codepointsproduce real glyphs with valid SDF gradients, e.g. U+03AC
13x21, min=0 max=224 maxAdjStep=34, U+03CE17x21, min=0 max=231 maxAdjStep=34.make test(importer,mapsrv, stylegen) is fully green.
Visual render over CDP (R127 — no
--virtual-time-budget) — Greece data is not yetimported, so I could not render Greek map features. Instead I drove the live font
stack the map actually uses: a scratch MapLibre page served by mapsrv loads glyphs from
/fonts/Go Regular/768-1023.pbf(the Greek block, confirmed200) and places the samplenames Αθήνα, Θεσσαλονίκη, Πειραιάς, Κρήτη, Αιγαίο Πέλαγος, Ολυμπία, Δελφοί, Σπάρτη. I drove
Chrome over CDP in real time (
scripts/gr-glyph-cdp.mjs, the R127 pattern fromdocs/performance.md): the map reported ready, all 8 labels rendered (queried viaqueryRenderedFeatures), the Greek glyph range fetched200, no glyph load failures, andthe only console error was a 404 for
favicon.ico(not a glyph). The screenshot wasverified with the local vision model (Qwen2.5-VL-3B): it read the Greek labels correctly
and, on the negative control, reported no hollow/tofu missing-glyph boxes. Screenshot
at
/tmp/gr-glyph.png(test run).Remaining / uncertain:
against Greek map features, because Greece is not imported yet. The on-map confirmation
lands with the pilot (#172). The CDP driver (
scripts/gr-glyph-cdp.mjs) and the testpage (
html/gr-glyph-test.html) are committed so the render is reproducible.docs/country-gr.mddoes not exist on main (it lives on the unmergedissue-171branch). Per the issue's "once it exists", I recorded the verdict in R7 and will append
the glyph note to
docs/country-gr.mdwhen that branch lands. R7 currently points toit.
pilot branch. Its untracked
conf/gr/files are not part of this PR.