ws-arch: font/ttf (TrueType / CFF OpenType / collections) with tests vs fontTools, HarfBuzz and FreeType
This commit is contained in:
1 parent
b549438a0c
commit
e7037cced1
2 files changed
+3
-1
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user