-
Notifications
You must be signed in to change notification settings - Fork 122
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
TTY compatible format for font #138
Comments
What the format is? It might be exportable by FontForge. Edit: Yes, it is exportable (just change the output file extension in |
While it is possible, i tried "just changing output file extension" and... it just didn't export it. I'm sure there are methods to get this to work, but this should be done by someone who knows how to font (which i do not). I also tried to do this using fontforge on a ttf, but some pixels duplicate in width for some reason ( ._.) I think it might be easier to just parse the matrix in json files into .psf directly. Like seriously, try on scientifica for example:
The output is literally just bitmap font, more compact than jsons used. Some lines this outputs
|
Did you do something like this? diff --git a/src/monocraft.py b/src/monocraft.py
index 8e8069c..15b434d 100644
--- a/src/monocraft.py
+++ b/src/monocraft.py
@@ -357,7 +357,7 @@ def generateFont(*, black=False, bold=False, semibold=False, light=False, extral
for font in fontList:
if font is None:
continue
- font.generate(f"{outputDir}{font.fontname}.otf")
+ font.generate(f"{outputDir}{font.fontname}.psf")
if output_ttc:
fontList[0].generateTtc( At least it exports on my end. |
Oh, you can just export it into psf directly? Strange, because fontforge app can't. Though if you read what's inside, it is obviously not what it's supposed to be. Even if you skip headers (which there shouldn't be), the xxd shows just noise. I tried to convert to bdf first, knowing fontforge app can do that, but i guess there need to be some special options set before. setfont also complains about wrong size. |
Actually i'm wondering if you can just make a little header and parse the json by hand |
It would be sweet to get version of monocraft, that can be used as tty font (for example, when system boots up). i'm talking about
setfont
command and fonts in/usr/share/kbd/consolefonts
.UPD: Tried to do it myself with
bdf2psf
andotf2bdf
, but got unreadable font.The text was updated successfully, but these errors were encountered: