unital / tempe

Beautiful Micropython Graphics
MIT License
3 stars 0 forks source link

Support alright fonts #4

Open corranwebster opened 1 month ago

corranwebster commented 1 month ago

The minified vector fonts from https://github.com/lowfatcode/alright-fonts may be better than bitmap fonts.

corranwebster commented 1 month ago

Experimentation shows that they rely on being able to render multi-polygons with winding number in/out rules, which is beyond the capabilities of FrameBuffer. Might be able to fake it by testing the initial point of a contour to see if it is set.

corranwebster commented 1 month ago

Putting this on the back burner - this is effectively needing either a custom renderer or on-the-fly rendering into a bit buffer for every character write. Both are likely to be too slow.

corranwebster commented 3 weeks ago

Might be able to fake it by testing the initial point of a contour to see if it is set.

Could probably fake it by xor-ing subsequent curves, since fonts are not usually self-intersecting, but that means needing a temporary buffer to work with to get the mask, at least for multi-curve fonts.