-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand character set and rework as kbitx
- Loading branch information
Showing
20 changed files
with
4,829 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
out | ||
.nova |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import glob, os, shutil | ||
from fontTools import ttLib | ||
|
||
ZIP_NAME = "Northrup" | ||
|
||
OUT_PATH = "./out/files" | ||
JAR_PATH = "../BitsNPicas.jar" | ||
|
||
UNITS_PER_EM = 1024 | ||
PX_SIZE = 64 | ||
|
||
os.makedirs(OUT_PATH, exist_ok = True) | ||
|
||
for kbitx in glob.iglob("./src/*.kbitx"): | ||
name = os.path.basename(os.path.splitext(kbitx)[0]) | ||
dest = f"{OUT_PATH}/{name}.ttf" | ||
|
||
if os.path.exists(dest): | ||
os.remove(dest) | ||
|
||
os.system( | ||
f"java -jar {JAR_PATH} " + | ||
f"convertbitmap -f ttf -w {PX_SIZE} -h {PX_SIZE} -o {dest} {kbitx}" | ||
) | ||
|
||
with ttLib.TTFont(dest) as font: | ||
font["head"].unitsPerEm = UNITS_PER_EM | ||
font.save(dest) | ||
|
||
os.system(f"woff2_compress {dest}") | ||
shutil.copyfile(kbitx, f"{OUT_PATH}/{name}.kbitx") | ||
|
||
os.chdir(OUT_PATH) | ||
shutil.make_archive(f"../{ZIP_NAME}", "zip") |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.