Fix heading print
parent
9816ee7f6d
commit
d87dfa9ee2
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
build:
|
||||
@mkdir -p out
|
||||
@python3 build.py -B 2> out/err.log
|
||||
@python3 build.py -B 2> out/err.log || { echo "Build Failed. Please check out/err.log for detailed information"; false; }
|
||||
@py3clean .
|
||||
|
||||
install: build
|
||||
|
|
|
@ -3,5 +3,6 @@ patchVersion = 2 # 업데이트 후 캐시를 무시하기 위해서 사용
|
|||
|
||||
from . import select as selectGlyphs
|
||||
from .download import download
|
||||
from .download import isCached
|
||||
from .cacheBuilder import getCachedFont
|
||||
from .patcher import pasteGlyphs
|
||||
|
|
|
@ -20,3 +20,5 @@ def download():
|
|||
shutil.rmtree('assets/NanumSquareNeoKr.extract')
|
||||
print(" [OK]")
|
||||
return "assets/NanumSquareNeoKr.ttf"
|
||||
|
||||
def isCached(): return os.path.exists("assets/NanumSquareNeoKr.ttf")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
from .download import downloadPatcher
|
||||
from .download import isCached
|
||||
from .download import nerdFonts_Download_Test
|
|
@ -18,4 +18,6 @@ def downloadPatcher():
|
|||
print(" [OK]")
|
||||
return "assets/NerdFontPatcher_extract"
|
||||
|
||||
def isCached(): return os.path.exists("assets/NerdFontPatcher_extract")
|
||||
|
||||
def nerdFonts_Download_Test(): downloadPatcher()
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
patchVersion = 2
|
||||
|
||||
from .download import download
|
||||
from .download import isCached
|
||||
from . import select as selectGlyphs
|
||||
from .cacheBuilder import getCachedFont
|
||||
from .patcher import pasteGlyphs
|
||||
|
|
|
@ -9,3 +9,5 @@ def download():
|
|||
if not os.path.exists("assets/NotoMonoCJKkr.otf"):
|
||||
wgetHandler.download(github_NotoSansMonoCJKkr,"assets/NotoMonoCJKkr.otf")
|
||||
return "assets/NotoMonoCJKkr.otf"
|
||||
|
||||
def isCached(): return os.path.exists("assets/NotoMonoCJKkr.otf")
|
||||
|
|
|
@ -22,7 +22,7 @@ def pasteGlyphs(target,sourcePath,deselectOriginalGlyphs,EnabledItems,baseSize=5
|
|||
selectGlyphs.SelectByEnabledList(source,EnabledItems)
|
||||
deselectOriginalGlyphs(source)
|
||||
source.copy()
|
||||
selectGlyphs.SelectByEnabledList(source,target)
|
||||
selectGlyphs.SelectByEnabledList(target,EnabledItems)
|
||||
deselectOriginalGlyphs(target)
|
||||
target.paste()
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ def CJKUnifiedIdeographs(font):
|
|||
# CJK Unified Ideograph
|
||||
font.selection.select(selFlag,0x4E00,0x9FFF)
|
||||
|
||||
|
||||
def CJKUnifiedIdeographsExtension(font):
|
||||
font.selection.select(selFlag,0x3400,0x4DBF) # Extension A
|
||||
font.selection.select(selFlag,0x20000,0x2A6DF) # Extension B
|
||||
|
|
|
@ -13,10 +13,16 @@ def build(config=None):
|
|||
# 메인 폰트 불러오기 / 에셋 다운로드
|
||||
kawaii = fontforge.open(
|
||||
KawaiiMonoLoader.getFontPath())
|
||||
print("-------------- DOWNLOAD PATCH CONTENTS --------------")
|
||||
downloadContentHeader = False
|
||||
def printDownloadContentHeader():
|
||||
nonlocal downloadContentHeader
|
||||
if downloadContentHeader == False:
|
||||
downloadContentHeader = True
|
||||
print("-------------- DOWNLOAD PATCH CONTENTS --------------")
|
||||
# 나눔 스퀘어 네오 다운로드
|
||||
nanumSquareNeo = None
|
||||
if config.get("CopyKoreanGlyphs"):
|
||||
if not NanumSquareNeoLoader.isCached(): printDownloadContentHeader()
|
||||
nanumSquareNeo = NanumSquareNeoLoader.download()
|
||||
# 노토 모노 다운로드/불러오기
|
||||
notoMono = None
|
||||
|
@ -24,12 +30,14 @@ def build(config=None):
|
|||
config.get("CopyCJKUnifiedIdeographs") or
|
||||
config.get("CopyCJKUnifiedIdeographsExtension") or
|
||||
config.get("CopyCJKCompatibilityIdeographs")):
|
||||
if not NotoMonoLoader.isCached(): printDownloadContentHeader()
|
||||
notoMono = NotoMonoLoader.download()
|
||||
# Nerd fonts 패치기 다운로드
|
||||
nerdFontsPatcherPath = None
|
||||
if config.get("NerdFonts"):
|
||||
if not NerdFontsLoader.isCached(): printDownloadContentHeader()
|
||||
nerdFontsPatcherPath = NerdFontsLoader.downloadPatcher()
|
||||
print("--------------------- Patching ---------------------")
|
||||
print("--------------------- Patching ----------------------")
|
||||
|
||||
# 유지 목록 (덮어쓰기 금지) 만들기
|
||||
kawaii.selection.all()
|
||||
|
@ -64,10 +72,10 @@ def build(config=None):
|
|||
EnabledItems = {
|
||||
"JapaneseGlyphs": config.get("CopyJapaneseGlyphs") or False,
|
||||
"CJKUnifiedIdeographs": config.get("CopyCJKUnifiedIdeographs") or False,
|
||||
"CJKUnifiedIdeographsExtension": config.get("CopyCJKUnifiedIdeographsExtension"),
|
||||
"CJKCompatibilityIdeographs": config.get("CopyCJKCompatibilityIdeographs"),
|
||||
"CJKUnifiedIdeographsExtension": config.get("CopyCJKUnifiedIdeographsExtension") or False,
|
||||
"CJKCompatibilityIdeographs": config.get("CopyCJKCompatibilityIdeographs") or False,
|
||||
"Symbols": config.get("CopySymbols") or False,
|
||||
},
|
||||
Symbols=config.get("CopySymbols") or False,
|
||||
target=kawaii,baseSize=550,
|
||||
sourcePath=notoMono,
|
||||
deselectOriginalGlyphs = deselectOriginalGlyphs)
|
||||
|
|
Loading…
Reference in New Issue