mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
fix: hangul filler not working on OTF
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,3 +20,4 @@ OTFbuild/*.otf
|
||||
OTFbuild/*.woff
|
||||
OTFbuild/*.woff2
|
||||
*.fea
|
||||
*.xdp-*
|
||||
|
||||
Binary file not shown.
@@ -124,6 +124,16 @@ def compose_hangul(assets_dir) -> Dict[int, ExtractedGlyph]:
|
||||
result[pua] = ExtractedGlyph(pua, GlyphProps(width=w), bm)
|
||||
variant_count += 1
|
||||
|
||||
# Ensure jungseong filler PUA variants exist (col=0, rows 15-16).
|
||||
# The filler has an empty bitmap so extract_hangul_jamo_variants skips
|
||||
# it, but the vjmo GSUB lookup needs a PUA target to substitute to.
|
||||
empty_bm = [[0] * cell_w for _ in range(cell_h)]
|
||||
for row in [15, 16]:
|
||||
pua = _pua_for_jamo_variant(0, row)
|
||||
if pua not in result:
|
||||
result[pua] = ExtractedGlyph(pua, GlyphProps(width=0), empty_bm)
|
||||
variant_count += 1
|
||||
|
||||
print(f" Stored {variant_count} jamo variant glyphs in PUA (0x{HANGUL_PUA_BASE:05X}+)")
|
||||
print(f" Total Hangul glyphs: {len(result)}")
|
||||
return result
|
||||
|
||||
@@ -153,7 +153,7 @@ def _generate_hangul_gsub(glyphs, has, jamo_data):
|
||||
|
||||
# Build codepoint lists (standard + extended jamo ranges)
|
||||
cho_ranges = list(range(0x1100, 0x115F)) + list(range(0xA960, 0xA97C))
|
||||
jung_ranges = list(range(0x1161, 0x11A8)) + list(range(0xD7B0, 0xD7C7))
|
||||
jung_ranges = list(range(0x1160, 0x11A8)) + list(range(0xD7B0, 0xD7C7))
|
||||
jong_ranges = list(range(0x11A8, 0x1200)) + list(range(0xD7CB, 0xD7FC))
|
||||
|
||||
cho_cps = [cp for cp in cho_ranges if has(cp)]
|
||||
|
||||
Reference in New Issue
Block a user