Prepare bold
							parent
							
								
									83ba0e1c09
								
							
						
					
					
						commit
						0437240394
					
				| 
						 | 
					@ -1,2 +1,2 @@
 | 
				
			||||||
def getFontPath():
 | 
					def getFontPath(weightStr):
 | 
				
			||||||
    return "KawaiiMonoRegular.sfd"
 | 
					    if weightStr == "Regular": return "KawaiiMonoRegular.sfd"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue