diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3498e2a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/wget"] + path = src/wget + url = https://github.com/steveeJ/python-wget diff --git a/config.py b/config.py index 675dfaa..bf91666 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ # TODO: 블록 글자 추가 # TODO: 기울임꼴(ah 같은 특수 기울임도) 추가 +# TODO: 합자 추가 config = { # ------------------------------------------- diff --git a/src/NotoMono.py b/src/NotoMono.py index 47f60bd..14bedca 100644 --- a/src/NotoMono.py +++ b/src/NotoMono.py @@ -10,7 +10,7 @@ def getFontPath(): wgetHandler.download(github_NotoSansMonoCJKkr,"assets/NotoMonoCJKkr.otf") return "assets/NotoMonoCJKkr.otf" -def pasteGlyphs(target,source,baseSize=550): +def pasteGlyphs(target,source,baseSize=550,JapaneseGlyphs=False,CJKUnifiedIdeographs=False): source.cidFlatten() def select(font): diff --git a/src/build.py b/src/build.py index edc259a..9f10704 100644 --- a/src/build.py +++ b/src/build.py @@ -13,7 +13,7 @@ def build(config=None): kawaii.encoding = 'UnicodeFull' # 한글 글리프 붇여넣기 - if config.CopyKoreanGlyphs: + if config.get("CopyKoreanGlyphs"): # 나눔 스퀘어 네오 다운로드/불러오기 nanumSquareNeo = fontforge.open( NanumSquareNeoLoader.getFontPath()) @@ -22,11 +22,17 @@ def build(config=None): target=kawaii,baseSize=550, source=nanumSquareNeo) - if config.CopyJPGlyphs or config.Copy: + if (config.get("CopyJapaneseGlyphs") or + config.get("CopyCJKUnifiedIdeographs")): # 노토 모노 다운로드/불러오기 notoMono = fontforge.open( NotoMonoLoader.getFontPath()) - + # 글리프 붇여넣기 + NotoMonoLoader.pasteGlyphs( + JapaneseGlyphs=config.get("CopyJapaneseGlyphs") or False, + CJKUnifiedIdeographs=config.get("CopyCJKUnifiedIdeographs") or False, + target=kawaii,baseSize=550, + source=nanumSquareNeo) # 생성 kawaii.generate("kawaiiPatched.ttf") diff --git a/src/wget b/src/wget new file mode 160000 index 0000000..fdd3a0f --- /dev/null +++ b/src/wget @@ -0,0 +1 @@ +Subproject commit fdd3a0f8404ccab90f939f9952af139e6c55142a