Open sophronesis opened 4 months ago
What the format is? It might be exportable by FontForge.
Edit: Yes, it is exportable (just change the output file extension in monocraft.py
). But i can't confirm if it's usable or not.
What the format is? It might be exportable by FontForge.
Edit: Yes, it is exportable (just change the output file extension in
monocraft.py
). But i can't confirm if it's usable or not.
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:
sudo bdf2psf --fb scientifica-11.bdf /usr/share/bdf2psf/standard.equivalents /usr/share/bdf2psf/fontsets/Lat2.256 256 a.psf
xxd -b -c1 a.psf | tr '1' '#' | tr '0' ' ' | less
The output is literally just bitmap font, more compact than jsons used.
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 withbdf2psf
andotf2bdf
, but got unreadable font.