-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
20 changed files
with
6,450 additions
and
0 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,3 @@ | ||
bin/ | ||
release/ | ||
*.o |
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,3 @@ | ||
[submodule "wowlib"] | ||
path = wowlib | ||
url = https://github.com/z64me/wowlib |
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,57 @@ | ||
# z64font | ||
|
||
`z64font` is a font tool that rasterizes TrueType font (`.ttf`) files | ||
into a format compatible with Ocarina of Time and Majora's Mask. | ||
Whether you're looking to localize these games into new languages that | ||
rely on brand new character sets, or you're just adding a fresh coat of | ||
paint to your romhack, this program makes your job a whole lot easier. | ||
|
||
![preview.gif](preview.gif) | ||
|
||
## How to use | ||
|
||
`z64font` requires you to provide only two files: | ||
- A UTF8-encoded text document containing a sample string and | ||
a list of codepoints. | ||
- The TrueType font (`.ttf`) file you wish to convert. | ||
|
||
Here are the latest codepoint files (simply `Ctrl + S` in your browser): | ||
- [Ocarina of Time codepoints](https://raw.githubusercontent.com/z64me/z64font/main/codepoints/oot.txt) | ||
- [Majora's Mask codepoints](https://raw.githubusercontent.com/z64me/z64font/main/codepoints/mm.txt) | ||
|
||
You can use your scroll wheel to effortlessly tweak each control. Once | ||
you are happy with how your font is displaying in the preview window, | ||
click the `Export Binaries` button. You will be prompted to select a | ||
location and filename for them. Let's assume you chose the name `wow`. | ||
|
||
Once you have done that, two files will be generated: `wow.font_static` | ||
and `wow.font_width`. | ||
|
||
What you do next depends on your workflow. | ||
|
||
<!--### [`zzrtl`](https://github.com/z64me/zzrtl) users | ||
Overwrite the `font_static` and `font_width` files in your project's | ||
root directory with these new files. | ||
TODO implement external font file support in zzrtl | ||
--> | ||
|
||
### Traditional hackers | ||
|
||
Inject the files into your decompressed game using a hex editor. | ||
For Windows users, I recommend [HxD](https://mh-nexus.de/en/hxd/). | ||
|
||
| Game | .font_static | .font_width | | ||
| ------------- | --------------- | ----------------------------- | | ||
| OoT debug | `0x008C1000` | `0x00BCABA0` | | ||
| OoT NTSC 1.0 | `0x00928000` | `0x00B88EA0` | | ||
| MM USA | `0x00ACC000` | `0x00C669B0` and `0x00C66E50` | | ||
|
||
If you don't know how to decompress your copy of the game, look no | ||
further than [`z64decompress`](https://github.com/z64me/z64decompress). | ||
|
||
### [OoT decomp](https://github.com/zeldaret/oot) and [MM decomp](https://github.com/zeldaret/mm) users | ||
|
||
The OoT/MM decomps will be made targetable as each finalizes | ||
its font handling. | ||
|
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,145 @@ | ||
This is sample text.\nStepping Stones in the Pond\nIf you boldly go in the direction\nyou want to jump, you will leap\nautomatically.\n¥ºªÀÁÂÄÇÈÉÊËÌÍÎÏÑÒÓÔÖÙÚÛÜβàáâäçèéêëìíîïñòóôöùúûü¡¿ | ||
|
||
! | ||
" | ||
# | ||
$ | ||
% | ||
& | ||
' | ||
( | ||
) | ||
* | ||
+ | ||
, | ||
- | ||
. | ||
/ | ||
0 | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
: | ||
; | ||
< | ||
= | ||
> | ||
? | ||
@ | ||
A | ||
B | ||
C | ||
D | ||
E | ||
F | ||
G | ||
H | ||
I | ||
J | ||
K | ||
L | ||
M | ||
N | ||
O | ||
P | ||
Q | ||
R | ||
S | ||
T | ||
U | ||
V | ||
W | ||
X | ||
Y | ||
Z | ||
[ | ||
¥ | ||
] | ||
^ | ||
_ | ||
` | ||
a | ||
b | ||
c | ||
d | ||
e | ||
f | ||
g | ||
h | ||
i | ||
j | ||
k | ||
l | ||
m | ||
n | ||
o | ||
p | ||
q | ||
r | ||
s | ||
t | ||
u | ||
v | ||
w | ||
x | ||
y | ||
z | ||
{ | ||
| | ||
} | ||
~ | ||
º | ||
À | ||
Á | ||
 | ||
Ä | ||
Ç | ||
È | ||
É | ||
Ê | ||
Ë | ||
Ì | ||
Í | ||
Î | ||
Ï | ||
Ñ | ||
Ò | ||
Ó | ||
Ô | ||
Ö | ||
Ù | ||
Ú | ||
Û | ||
Ü | ||
β | ||
à | ||
á | ||
â | ||
ä | ||
ç | ||
è | ||
é | ||
ê | ||
ë | ||
ì | ||
í | ||
î | ||
ï | ||
ñ | ||
ò | ||
ó | ||
ô | ||
ö | ||
ù | ||
ú | ||
û | ||
ü | ||
¡ | ||
¿ | ||
ª |
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,127 @@ | ||
This is sample text.\nStepping Stones in the Pond\nIf you boldly go in the direction\nyou want to jump, you will leap\nautomatically.\n¥ÀîÂÄÇÈÉÊËÏÔÖÙÛÜβàáâäçèéêëïôöùûü | ||
|
||
! | ||
" | ||
# | ||
$ | ||
% | ||
& | ||
' | ||
( | ||
) | ||
* | ||
+ | ||
, | ||
- | ||
. | ||
/ | ||
0 | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 | ||
: | ||
; | ||
< | ||
= | ||
> | ||
? | ||
@ | ||
A | ||
B | ||
C | ||
D | ||
E | ||
F | ||
G | ||
H | ||
I | ||
J | ||
K | ||
L | ||
M | ||
N | ||
O | ||
P | ||
Q | ||
R | ||
S | ||
T | ||
U | ||
V | ||
W | ||
X | ||
Y | ||
Z | ||
[ | ||
¥ | ||
\ | ||
^ | ||
_ | ||
` | ||
a | ||
b | ||
c | ||
d | ||
e | ||
f | ||
g | ||
h | ||
i | ||
j | ||
k | ||
l | ||
m | ||
n | ||
o | ||
p | ||
q | ||
r | ||
s | ||
t | ||
u | ||
v | ||
w | ||
x | ||
y | ||
z | ||
{ | ||
| | ||
} | ||
~ | ||
À | ||
î | ||
 | ||
Ä | ||
Ç | ||
È | ||
É | ||
Ê | ||
Ë | ||
Ï | ||
Ô | ||
Ö | ||
Ù | ||
Û | ||
Ü | ||
β | ||
à | ||
á | ||
â | ||
ä | ||
ç | ||
è | ||
é | ||
ê | ||
ë | ||
ï | ||
ô | ||
ö | ||
ù | ||
û | ||
ü |
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 @@ | ||
echo "-DNDEBUG -Wall -flto -lm -Os -s -flto -Iwowlib -DWOW_OVERLOAD_FILE src/*.c -Isrc " |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
mkdir -p bin/release | ||
|
||
gcc -o bin/release/z64font-linux -DZ64FONT_GUI `./common.sh` `wowlib/deps/wow_gui_x11.sh` | ||
|
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,13 @@ | ||
mkdir -p bin/release | ||
mkdir -p bin/o/win32 | ||
|
||
PATH=$PATH:~/c/mxe/usr/bin | ||
|
||
# icon | ||
i686-w64-mingw32.static-windres src/icon.rc -o bin/o/win32/icon.o | ||
|
||
i686-w64-mingw32.static-gcc -o bin/release/z64font.exe `./common.sh` \ | ||
-municode -DZ64FONT_GUI \ | ||
`wowlib/deps/wow_gui_win32.sh` \ | ||
bin/o/win32/icon.o | ||
|
Oops, something went wrong.