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():
return "KawaiiMonoRegular.sfd"
def getFontPath(weightStr):
if weightStr == "Regular": return "KawaiiMonoRegular.sfd"

View File

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

View File

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