-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any user-friendly font making util? #161
Comments
The PBM fonts are just images, you can edit them any image editor I think, I know GIMP works. For converting a normal font to PBM anything that can export a font as an image should work, then just use GIMP or such to convert to PBM if it gave you something else, I just used PBM since that's what GodMode9 used before. |
one need to feed the script a map.txt, and i can't find a proper script to generates the pair, and gm9 did not use this as well. (im making CJK compatible font) |
The map.txt is just a very simple list of Unicode codepoints in the exact order they appear in the image, the map will be sorted and have any duplicates removed by the generator so you have any blank spaces (such as in the default font, since it's based on JIS X 0208) you can just put spaces in the map and they'll all be removed automatically. They just need to be separated by any kind of whitespace so you can split them into lines to match the image or just dump them all separated by spaces, it doesn't make a difference. For example, this is a very simple Python script that will take a file and convert it to a space separated list of all the codepoints in that file: #!/usr/bin/env python3
import struct
with open("in.txt") as input, open("out.txt", "w") as output:
str = input.read()
output.write(" ".join(f"0x{ord(char):04X}" for char in str))
For the ones I've done I've just looked up the encoding of what I'm doing, convert that to Unicode codepoints, then pasted that into a .txt file, and added any additional characters manually. Probably some way to get the exact list from a normal font file but not sure exactly. |
as the current script requires PBM font and I did not able to find a proper script for that
The text was updated successfully, but these errors were encountered: