diff --git a/.gitignore b/.gitignore index a6b8e21..9d9ede8 100755 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ OTFbuild/*.otf OTFbuild/*.woff OTFbuild/*.woff2 *.fea +*.xdp-* diff --git a/OTFbuild/calligra_font_tests.odt b/OTFbuild/calligra_font_tests.odt index 1e7fae6..0ab6a8c 100644 Binary files a/OTFbuild/calligra_font_tests.odt and b/OTFbuild/calligra_font_tests.odt differ diff --git a/OTFbuild/hangul.py b/OTFbuild/hangul.py index f70d803..858bd01 100644 --- a/OTFbuild/hangul.py +++ b/OTFbuild/hangul.py @@ -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 diff --git a/OTFbuild/opentype_features.py b/OTFbuild/opentype_features.py index 3fe17ba..6877bb3 100644 --- a/OTFbuild/opentype_features.py +++ b/OTFbuild/opentype_features.py @@ -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)]