Cozette
Cozette copied to clipboard
Scaling for HiDPI displays
Hi! While Cozette looks beautiful, it is way to small to be used on HiDPI displays. Would it be possible to scale every glyph by a factor of 2 or more? Or at least could you please advise the best way one can scale an .otb font, pixel-perfectly, so each pixel becomes a 2x2 block? Thank you.
UPDATE: I managed to scale Cozette using this tool for scaling BDF fonts: https://github.com/philj56/bdfscale Also, with a minor modification of the above script, I scaled the font so that each pixel becomes 2x3 or 3x4 block. I report that Cozette looks beautiful scaled by 3x4! (See issue #3 which requests a taller variant.)
I'm probably not going to provide builds with the scaling applied, but I'll add instructions on how to do that to the README - glad you figured it out and that it works for you!
UPDATE: I managed to scale Cozette using this tool for scaling BDF fonts: https://github.com/philj56/bdfscale Also, with a minor modification of the above script, I scaled the font so that each pixel becomes 2x3 or 3x4 block. I report that Cozette looks beautiful scaled by 3x4! (See issue #3 which requests a taller variant.)
Can you provide instructions on how to do this please?
Can you provide instructions on how to do this please?
Not OP, but run the python script they linked.
Can you provide instructions on how to do this please?
Not OP, but run the python script they linked.
Thanks; I was running the script but not correctly outputting a new BDF file. Eventually, I was able to figure out that I needed to add > cozette-scaled.bdf
to generate the new BDF file.
Thanks; I was running the script but not correctly outputting a new BDF file. Eventually, I was able to figure out that I needed to add
> cozette-scaled.bdf
to generate the new BDF file.
After scaling, I additionally had to load the scaled .BDF font in FontForge, select all "glyphs worth outputting", and then in Metrics --> Set Width specify the width that is 4/3 times what was there before; then export as .OTB. Without this step, the characters were spaced strangely (on GNU/Linux). I suspect that this extra step is necessary due to bdfscale not correctly scaling one or more of the font metrics.
With that last note, it sounds like something I could provide a build command for to make it simpler. Should happen in the next release.
Hi, I am experiencing the same issue with Cozette appearing too small. When I try scaling it using bdfscale with a factor of 2 and then converting it to .otb using FontForge, the font then appears too big. I have been struggling with this for weeks now and I can't figure it out on my own since I don't have a lot of experience working with fonts. Could someone please suggest an alternative method to scale Cozette (of bitmap fonts in general) or send an already scaled version? Any help would be greatly appreciated!
@sidosoft Can you please provide your scaled version?
This is still an issue. I love this font and want to use it everywhere, but we need to have support for HiDPI displays. :disappointed:
I dropped the ball on this - it's almost three years later, and I forgot about this issue entirely. I'll take a look at shipping scaled-up versions this week.
I'm years late, but v.1.19.2-hidpi is now live; it contains a 2x upscaled version of the bitmap font.
Hey @slavfox, I gave the hidpi version a shot and things look a little off on arch using the foot terminal. Is there some step necessary to make these look better?
What pixel size is this at? Bitmap fonts are intended to render correctly at one and one size only, and the target for cozette_hidpi
is 26pts.
That is with size 26. I tried a few other sizes as well and they all have the same look. Maybe something up with my foot
terminal settings?
Huh, yeah; I can reproduce this in Alacritty. I'll look at it further. Reopening this issue for now.
Found the issue. Should have a fix out today.
This should be fixed in v1.19.2-hidpi2.