Prepare bold

master
Qwreey 2023-03-17 03:55:01 +09:00
parent 83ba0e1c09
commit 0437240394
No known key found for this signature in database
GPG Key ID: 01D9B192033CF43F
3 changed files with 12 additions and 10 deletions

View File

@ -1,2 +1,2 @@
def getFontPath(): def getFontPath(weightStr):
return "KawaiiMonoRegular.sfd" if weightStr == "Regular": return "KawaiiMonoRegular.sfd"

View File

@ -9,10 +9,10 @@ from . import KawaiiMono as KawaiiMonoLoader
deselectFlags = ("less","unicode") deselectFlags = ("less","unicode")
def build(config=None): def build(weightStr="Regular",config=None):
# 메인 폰트 불러오기 / 에셋 다운로드 # 메인 폰트 불러오기 / 에셋 다운로드
kawaii = fontforge.open( kawaii = fontforge.open(
KawaiiMonoLoader.getFontPath()) KawaiiMonoLoader.getFontPath(weightStr=weightStr))
downloadContentHeader = False downloadContentHeader = False
def printDownloadContentHeader(): def printDownloadContentHeader():
nonlocal downloadContentHeader nonlocal downloadContentHeader
@ -67,7 +67,7 @@ def build(config=None):
if nanumSquareNeo: if nanumSquareNeo:
# 글리프 붇여넣기 # 글리프 붇여넣기
NanumSquareNeoLoader.pasteGlyphs( NanumSquareNeoLoader.pasteGlyphs(
target=kawaii,baseSize=baseSize,weightStr="Regular", target=kawaii,baseSize=baseSize,weightStr=weightStr,
sourcePath=nanumSquareNeo, sourcePath=nanumSquareNeo,
deselectOriginalGlyphs = deselectOriginalGlyphs) deselectOriginalGlyphs = deselectOriginalGlyphs)
updateOriginalGlyphs() updateOriginalGlyphs()
@ -94,13 +94,15 @@ def build(config=None):
target=kawaii, target=kawaii,
NerdFontsAdjust=config.get("NerdFontsAdjust") or False, NerdFontsAdjust=config.get("NerdFontsAdjust") or False,
baseSize=baseSize, baseSize=baseSize,
weightStr="Regular", weightStr=weightStr,
deselectOriginalGlyphs = deselectOriginalGlyphs) deselectOriginalGlyphs = deselectOriginalGlyphs)
updateOriginalGlyphs() updateOriginalGlyphs()
# 생성 # 생성
print("Saving",end="",flush=True)
if not os.path.exists("out"): os.mkdir("out") if not os.path.exists("out"): os.mkdir("out")
kawaii.generate("out/"+"KawaiiMonoRegularPatched.ttf") kawaii.generate("out/"+"KawaiiMonoRegularPatched.ttf")
print(" [OK]")
# KawaiiMonoRegularPatched.ttf # KawaiiMonoRegularPatched.ttf
# KawaiiMonoRegularPatched.otf # KawaiiMonoRegularPatched.otf
@ -110,4 +112,8 @@ def build(config=None):
# 파일 닫기 # 파일 닫기
kawaii.close() kawaii.close()
def buildAll(config):
build(weightStr="Regular",config=config)
build(weightStr="Bold",config=config)
if __name__ == "__main__": build() if __name__ == "__main__": build()

View File

@ -6,7 +6,3 @@
아 Bold 구현 ㅐ해야하는데 너무 귀찮으니 미래의 내가 해줄꺼라고 믿고 있어 아 Bold 구현 ㅐ해야하는데 너무 귀찮으니 미래의 내가 해줄꺼라고 믿고 있어
(미래의 나 오열?) (미래의 나 오열?)