From 48397900028ffc036b8c62c0fc62e3dd7010cd5f Mon Sep 17 00:00:00 2001 From: sayyadirfanali Date: Mon, 10 Nov 2025 00:14:32 +0530 Subject: [PATCH] potential fix for #9 --- Myna.otf | Bin 186612 -> 186612 bytes vert_compact.py | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 vert_compact.py diff --git a/Myna.otf b/Myna.otf index 0ff4b68aa0b8950f76178a0e6a9a3c0e6c414bb6..29fc9bf976747682ee5523c14316110d9fa5dcbd 100644 GIT binary patch delta 66 zcmV-I0KNb8u?zIE3y>fbrTJ_H00Pjk0000SPg5^4mXX)Aku;D5+Y(j|k;tfbreRDx00Pjk0000SPg5^4mXX(#ku;D5+Cr7!k;t4Ys$pywCzT2xsUT3;+NC diff --git a/vert_compact.py b/vert_compact.py new file mode 100644 index 0000000..7a59a53 --- /dev/null +++ b/vert_compact.py @@ -0,0 +1,27 @@ +import fontforge + +font = fontforge.open("./Myna.sfd") + +ascent = font.ascent +descent = font.descent + +RATIO = 0.9 + +# general +font.ascent = int(font.ascent * RATIO) +font.descent = int(font.descent * RATIO) + +# hhea +font.hhea_ascent = int(font.hhea_ascent * RATIO) +font.hhea_descent = int(font.hhea_descent * RATIO) + +# OS/2 typo +font.os2_typoascent = font.hhea_ascent +font.os2_typodescent = font.hhea_descent + +# OS/2 win +font.os2_winascent = ascent # can increase or decrease this if clipped +font.os2_windescent = descent + +font.save("Myna.sfd") +font.close()