tinygo-org / tinyfont

Text library for TinyGo displays
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
49 stars 12 forks source link

Add Fonter and Glypher interfaces #36

Closed sago35 closed 2 years ago

sago35 commented 2 years ago

This PR adds the Fonter interface and the Glypher interface.

The bad thing about this PR is that it breaks compatibility. I tried to keep the changes to a minimum, as in the second commit , but it didn't keep compatibility.

With this change, we can do the following

sago35 commented 2 years ago

An example of a Unicode pictogram is as follows I want to display it with a color, so I want to implement Draw() differently from the previous font.

image

sago35 commented 2 years ago

I was able to add the interface without breaking compatibility. After this, force-push.

deadprogram commented 2 years ago

This looks great @sago35 thanks for working on it! Now merging.