ws-arch: font/ttf (TrueType / CFF OpenType / collections) with tests vs fontTools, HarfBuzz and FreeType

This commit is contained in:
4DBug committed 2026-10-31 08:40:18 -05:00
1 parent f6ce1da736
commit e55f8a9a0d
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ def reference(name, data, index=0):
for a in letters:
for b in letters:
ga, gb = f.getGlyphID(cmap[ord(a)]), f.getGlyphID(cmap[ord(b)])
v = face.get_kerning(ga, gb, freetype.FT_KERNING_UNSCALED)
v = face.get_kerning(a, b, freetype.FT_KERNING_UNSCALED) # freetype-py maps characters to glyphs
kern.append([ga, gb, v.x])
elif "GPOS" in f:
blob = hb.Blob(data)
+2
View File
@@ -6,6 +6,8 @@
# tests/gen/fonts.luau { fonts = { { name, data, upem, ..., cmap, glyphs, kern, renders } }, woff = { ... }, ttc }
import base64, glob, json, os, subprocess
INPUTS = ["tools/fixtures/_font_reference.py"]
FONTS = os.environ.get("IMGUI_FONTS", os.path.expanduser("~/dev/luau/imgui/imgui-luau/fonts"))
PICK = ["Cousine-Regular", "DroidSans", "Karla-Regular", "ProggyClean", "Roboto-Medium"]