eeucalyptus / eeDA_legacy

Electronic Design Aid
Apache License 2.0
1 stars 0 forks source link

Text rendering #9

Closed eeucalyptus closed 7 years ago

eeucalyptus commented 7 years ago

Explaination

We need some kind of text rendering in gl. The most efficient way to do so seams to be rendering on a gl texture and then mapping this texture on a quad to determine the geometry.

Specs:

To start...

Some reading on that topic:

eeucalyptus commented 7 years ago

I think PIL would be a good choice to render the fonts. But the more important issue seems to be the conversion into a gl texture. This module creates a texture using numpy. Dunno if thats anything similar.

Musicted commented 7 years ago

I'll give freetype-py a chance. It's a collection of freetype bindings for python. freetype is distributed under a BSD-style license. That'd entail rendering bitmaps in-situ, maybe in steps of a factor of 2 in size, whenever they're needed. It should be pretty enough for now and easily enough implemented for me not to be pissed if we eventually replace it.

eeucalyptus commented 7 years ago

Fun fact on FreeType: Apple used to hold some patents on font hinting and prevented their usage in FreeType until 2011 (expiration date). Nevertheless, FreeType was used in macOS and iOS, with the activated hinting features. I'm trying not to judge this, but I really find this interesting :D source

Musicted commented 7 years ago

The branch is merged so I think our work here is almost done.