-
Hello, I'm looking for the functionality to turn off anti-aliasing when drawing fonts, a functionality useful for rendering 8-bit style fonts from standard TrueType fonts, and which appears, for instance, in raster drawing applications like GIMP. See for example the attached text sample, which I rendered in GIMP using the Georgia font with anti-aliasing turned off, which can be scaled up to create a pixelated aesthetic. I only recently started learning about the implementation of fonts in Go (or in general, for that matter), but I've seen no mention of anti-aliasing in either the Go font package or the Ebiten text package, and little discussion on the matter. My best guess would be that it just isn't implemented in Go, but I wanted to make sure I wasn't missing anything. If turning off anti-aliasing isn't an option in Go or Ebiten, could anyone offer any guidance as to how I should go about rendering pixelated fonts? The whole area is confusing to me, and I haven't had any luck finding a solution over the course of a few days or researching the topic, though I'll keep looking. I am aware of @hajimehoshi's bitmapfont package, which could work decently well for my use case, but I would still prefer a way to render any given font in the way specified above. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Because the font is converted from vector format to image by "rasterization", I don't think it would be easy to properly convert it to a 8-bit style bitmap. As far as I can tell, as you guessed, you're going to have to use bitmap fonts (Hajime's bitmapfont is one of them). |
Beta Was this translation helpful? Give feedback.
Because the font is converted from vector format to image by "rasterization", I don't think it would be easy to properly convert it to a 8-bit style bitmap.
As far as I can tell, as you guessed, you're going to have to use bitmap fonts (Hajime's bitmapfont is one of them).