From 5e906d8ee54ea6c10a88b86d7560d9129b9f511b Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Wed, 9 Sep 2026 12:58:37 -0400 Subject: [PATCH] Report every language a chart states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adapter.languages stopped at four codes. A chart that states more than four had the rest dropped from the archive metadata and from the bake's portrayal passes. 101AA00DS0001 in the S-101 1.2 test set states six: fin, iku, sme, smn, sms and swe. The two dropped were sme=Anár and sms=Lâu'ŋŋsuõllu, nameUsage 2 entries the portrayal catalogue selects on an exact language match. Baking that set without the cap grows the six-language chart from 54658 to 54954 bytes, and the 32 chart bake from 1.36s to 1.42s of user time. Bake size over the set is unchanged at KB resolution. --- docs/docs/limitations.md | 4 ---- src/s101/adapter.zig | 7 ------- 2 files changed, 11 deletions(-) diff --git a/docs/docs/limitations.md b/docs/docs/limitations.md index 9837522..fec7742 100644 --- a/docs/docs/limitations.md +++ b/docs/docs/limitations.md @@ -109,10 +109,6 @@ result is **best effort**: so a label mixing scripts still draws its fallback glyphs from the bundled face there. A host that supplies its own face through the surface callbacks is unaffected. -- **A chart states more than four languages.** The bake runs a portrayal pass - per language and stores a text property per language, so it keeps the first - four it finds and drops the rest. - - **Overscale hatch occlusion is tile-path only.** The S-52 §10.1.10 overscale indication (`OVERSC01`, see [architecture](./architecture.md)) is gated correctly everywhere, but only the generated MapLibre style sandwiches the diff --git a/src/s101/adapter.zig b/src/s101/adapter.zig index a4b85f0..1fe92f0 100644 --- a/src/s101/adapter.zig +++ b/src/s101/adapter.zig @@ -782,12 +782,6 @@ fn buildSurveyDateRange(a: std.mem.Allocator, children: *std.ArrayList(ChildEntr /// they first appear. An S-57 cell yields at most `und`, because the adapter /// tags NOBJNM that way and S-57 records no language for it. A native S-101 /// dataset yields its real ISO 639-2 codes. -/// -/// Capped, because each one costs a portrayal pass at bake time and a text -/// property per label in the tile. A chart naming its features in more -/// languages than this keeps the first few. -pub const max_languages = 4; - pub fn languages(a: std.mem.Allocator, adapted: []const Adapted) ![]const []const u8 { var out = std.ArrayList([]const u8).empty; for (adapted) |ad| { @@ -802,7 +796,6 @@ pub fn languages(a: std.mem.Allocator, adapted: []const Adapted) ![]const []cons } if (seen) continue; try out.append(a, lang); - if (out.items.len == max_languages) return out.items; } } return out.items;