gohufont
gohufont copied to clipboard
Hi-DPI versions have wrong sizes?
I'm trying to convert the 2x scaled bdf fonts to psf and pcf formats, using bdf2psf and bdftopcf respectively. The first tool fails complaining the 22px font has size 0, the second one converts the fonts successfully but both appears in xfontsel as 0px and 17px sized. Do you have any idead what is going on?
I'm not sure.
Can you try experimenting with these modifications (for the 22px size)?
--- a/hidpi/gohufont-22.bdf
+++ b/hidpi/gohufont-22.bdf
@@ -1,10 +1,11 @@
STARTFONT 2.1
FONT -Gohu-GohuFont-Medium-R-Normal--11-80-100-100-C-60-ISO8859-1
-SIZE 11 100 100
+SIZE 22 100 100
FONTBOUNDINGBOX 12 22 0 -4
STARTPROPERTIES 8
DEFAULT_CHAR 255
FACE_NAME "-Gohu-GohuFont-Medium-R-Normal--11-80-100-100-C-60-ISO8859-1"
+AVERAGE_WIDTH 120
FONT_ASCENT 18
FONT_DESCENT 4
PIXEL_SIZE 16
I've seen from bdf2psf's code that it needs the AVERAGE_WIDTH
value (which is the width, found in the first value of the FONTBOUNDINGBOX
, multiplied by 10).
And the SIZE 22
makes more sense even though I'm not sure if it's important.
I tried the patch and now bdf2pfs fails with
BDF Error on line 14: missing 'ENDPROPERTIES'
bdftopcf: bdf input, /build/source/hidpi/gohufont-22.bdf, corrupt
ping
I ran into the same issue with bdf2pdf reporting width 0 zero or too big
.
The proposed patch works, maybe @rnhmjoj applied the patch incorrectly?
I changed the SIZE
from 11 to 22 and added the AVERAGE_WIDTH 120
line below the FACE_NAME
line. Then I converted it with the following command line:
bdf2psf --fb gohufont-22.bdf '' '' 512 gohufont-22.psf
Quite possible, I'll give it another try when I have some time.