From 73c2b6986df68284fe458e45e3c9c8b0421325e0 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Mon, 2 Mar 2026 16:48:19 +0900 Subject: [PATCH] waaaaaaaaaa --- OTFbuild/font_builder.py | 4 ++++ OTFbuild/opentype_features.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/OTFbuild/font_builder.py b/OTFbuild/font_builder.py index 046737e..42bd6aa 100644 --- a/OTFbuild/font_builder.py +++ b/OTFbuild/font_builder.py @@ -213,6 +213,10 @@ def build_font(assets_dir, output_path, no_bitmap=False, no_features=False): g = glyphs[cp] if g.props.is_illegal: continue + # Skip C0/C1 control characters and DEL — some platforms render + # their traced bitmaps, which is undesirable. + if cp <= 0x001F or cp == 0x007F or 0x0080 <= cp <= 0x009F: + continue name = glyph_name(cp) if name == ".notdef": continue diff --git a/OTFbuild/opentype_features.py b/OTFbuild/opentype_features.py index 6877bb3..7ff025a 100644 --- a/OTFbuild/opentype_features.py +++ b/OTFbuild/opentype_features.py @@ -48,6 +48,26 @@ def generate_features(glyphs, kern_pairs, font_glyph_set, def has(cp): return glyph_name(cp) in font_glyph_set + preamble = """feature aalt { +languagesystem DFLT dflt; +languagesystem latn dflt; +languagesystem cyrl dflt; +languagesystem grek dflt; +languagesystem hang KOR ; +languagesystem hang KOH ; +languagesystem cyrl SRB ; +languagesystem cyrl BGR ; +languagesystem dev2 MAR ; +languagesystem dev2 NEP ; +languagesystem dev2 SAN ; +languagesystem dev2 SAT ; +languagesystem tml2 TAM ; +languagesystem sund SUN ; +} aalt; +""" + if preamble: + parts.append(preamble) + # ccmp feature (replacewith directives + Hangul jamo decomposition) ccmp_code = _generate_ccmp(replacewith_subs or [], has) if ccmp_code: