Closed jdevelop closed 6 years ago
This is a common problem when using antialiasing renderers. The trick is to draw the line in the "middle" of a pixel, e.g. x = 0.5
I added an example to demonstrate:
https://github.com/fogleman/gg/blob/master/examples/crisp.go
Interesting, let me try :) Is there a way that it can work with fonts? I want to draw some stuff on a cheap 128x64 OLED display, currently any font if scaled down to 10px - is readable, but ugly. Seems to be the same problem?
I wouldn't suggest vector fonts on such a display but rather some bitmap-based font.
Can gg.Context
work with bitmap fonts?
The default font is basicfont.Face7x13
. Try rendering text without setting a new font.
Should look something like this (zoomed in)
Perfect, that worked! Can I use other bitmap fonts?
I think that's the only such font that's built in.
Oh, I see - looks like there're some ways to load the custom bitmaps. Thanks a lot :) I think this one can be closed.
I am trying to create the bimaps, and looks like I can't have vertical or horizontal line of width of exactly
1 px
. Is there any way of making the width "strict"?