-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 452655b
Showing
9 changed files
with
46,625 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
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.
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,43 @@ | ||
import PIL.Image | ||
import PIL.ImageDraw | ||
import PIL.ImageFont | ||
|
||
font = PIL.ImageFont.truetype("Montserrat-Regular.otf", 22) | ||
|
||
chars=[] | ||
with open('code_manifest.json','r') as f: | ||
content = f.readlines() | ||
for line in content[16:7495]: | ||
line = line[line.find('"')+1:] | ||
key = line[:line.find('"')] | ||
if (key[0] == '\\' and len(key) == 6): | ||
key = unichr(int(key[2:],16)) | ||
chars.append(key) | ||
|
||
rows=1 | ||
cols=5 | ||
sheetCount = 1501 | ||
width=128 | ||
height=32 | ||
|
||
x_start_offset = 0 | ||
y_start_offset = 1 | ||
x_offset = 25 | ||
y_offset = 25 | ||
|
||
current_char = 0 | ||
for sheet in range(sheetCount): | ||
img = PIL.Image.new("RGBA", (width, height)) | ||
draw = PIL.ImageDraw.Draw(img) | ||
pos_y = y_start_offset | ||
for row in range(rows): | ||
pos_x = x_start_offset | ||
for col in range(cols): | ||
if (current_char < len(chars)): | ||
draw.text((pos_x, pos_y), chars[current_char], "#FFF", font=font) | ||
current_char += 1 | ||
if (current_char > 94): | ||
font = PIL.ImageFont.truetype("unifont-10.0.05.ttf", 22) | ||
pos_x += x_offset | ||
pos_y += y_offset | ||
img.save("code_sheet"+str(sheet)+".png","PNG") |
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,4 @@ | ||
// regex: ECMAScript grammar and case insensitive | ||
//ignore: | ||
|
||
//remap ignore: |
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,20 @@ | ||
#!/bin/sh | ||
|
||
git clone --recursive https://github.com/dnasdw/3dstool | ||
mkdir 3dstool/build | ||
cd 3dstool/build | ||
cmake .. | ||
make | ||
cd ../.. | ||
cp ignore_3dstool.txt 3dstool/bin/Release/ | ||
python create_png.py | ||
python bcfnt.py -cf code.bcfnt | ||
mkdir romfs | ||
./3dstool/bin/Release/3dstool -zvf code.bcfnt --compress-type lzex --compress-out romfs/cbf_std.bcfnt.lz | ||
./3dstool/bin/Release/3dstool -cvtf romfs romfs.bin --romfs-dir romfs | ||
dd bs=4096 skip=1 if=romfs.bin of=00000000.app.romfs | ||
rm -rf 3dstool | ||
rm -rf romfs | ||
rm code.bcfnt | ||
rm code_sheet* | ||
rm romfs.bin |
Binary file not shown.