Fix os2 height buggy

master
Qwreey 2023-03-17 04:52:58 +09:00
parent c6c93b08a3
commit 23bf977088
No known key found for this signature in database
GPG Key ID: 01D9B192033CF43F
3 changed files with 36 additions and 12 deletions

View File

@ -3,6 +3,6 @@ build:
@python3 build.py -B 2> out/err.log || { echo "Build Failed. Please check out/err.log for detailed information"; false; } @python3 build.py -B 2> out/err.log || { echo "Build Failed. Please check out/err.log for detailed information"; false; }
@py3clean . @py3clean .
install: build install:
@cp out/KawaiiMonoRegularPatched.ttf ~/.local/share/fonts/KawaiiMonoRegular.ttf @cp out/KawaiiMonoRegularPatched.ttf ~/.local/share/fonts/KawaiiMonoRegular.ttf
@fc-cache -f -v @fc-cache -f -v

View File

@ -36,7 +36,7 @@ def callPatcher(font):
args.progressbars = True args.progressbars = True
# args.quiet = True # args.quiet = True
args.quiet = False args.quiet = False
args.adjustLineHeight = True args.adjustLineHeight = False
# args.careful = True # args.careful = True
args.careful = False args.careful = False
args.single = False args.single = False

View File

@ -63,6 +63,30 @@ def build(config=None,weightStr="Regular"):
font=kawaii,targetWidth=baseSize font=kawaii,targetWidth=baseSize
) )
# os2 설정 저장
os2 = {
"os2_subxsize": kawaii.os2_subxsize,
"os2_subysize": kawaii.os2_subysize,
"os2_supxsize": kawaii.os2_supxsize,
"os2_supysize": kawaii.os2_supysize,
"os2_typoascent": kawaii.os2_typoascent,
"os2_typodescent": kawaii.os2_typodescent,
"os2_typolinegap": kawaii.os2_typolinegap,
"os2_width": kawaii.os2_width,
"os2_winascent": kawaii.os2_winascent,
"os2_windescent": kawaii.os2_windescent,
}
# NerdFonts 패치 적용
if config.get("NerdFonts"):
NerdFontsLoader.build(
target=kawaii,
NerdFontsAdjust=config.get("NerdFontsAdjust") or False,
baseSize=baseSize,
weightStr=weightStr,
deselectOriginalGlyphs = deselectOriginalGlyphs)
updateOriginalGlyphs()
# 한글 글리프 붇여넣기 # 한글 글리프 붇여넣기
if nanumSquareNeo: if nanumSquareNeo:
# 글리프 붇여넣기 # 글리프 붇여넣기
@ -88,18 +112,18 @@ def build(config=None,weightStr="Regular"):
deselectOriginalGlyphs = deselectOriginalGlyphs) deselectOriginalGlyphs = deselectOriginalGlyphs)
updateOriginalGlyphs() updateOriginalGlyphs()
# NerdFonts 패치 적용
if config.get("NerdFonts"):
NerdFontsLoader.build(
target=kawaii,
NerdFontsAdjust=config.get("NerdFontsAdjust") or False,
baseSize=baseSize,
weightStr=weightStr,
deselectOriginalGlyphs = deselectOriginalGlyphs)
updateOriginalGlyphs()
# 반올림 # 반올림
print("Position Rounding . . .",end="",flush=True) print("Position Rounding . . .",end="",flush=True)
kawaii.os2_subxsize = os2.get("os2_subxsize")
kawaii.os2_subysize = os2.get("os2_subysize")
kawaii.os2_supxsize = os2.get("os2_supxsize")
kawaii.os2_supysize = os2.get("os2_supysize")
kawaii.os2_typoascent = os2.get("os2_typoascent")
kawaii.os2_typodescent = os2.get("os2_typodescent")
kawaii.os2_typolinegap = os2.get("os2_typolinegap")
kawaii.os2_width = os2.get("os2_width")
kawaii.os2_winascent = os2.get("os2_winascent")
kawaii.os2_windescent = os2.get("os2_windescent")
kawaii.selection.all() kawaii.selection.all()
kawaii.round() kawaii.round()
kawaii.selection.none() kawaii.selection.none()