Dplug icon indicating copy to clipboard operation
Dplug copied to clipboard

Provide text support in dplug:canvas and/or canvasity

Open p0nce opened this issue 4 years ago • 2 comments

An awful lot of the needed parsing of fonts is done in printed:font, the only missing things is rasterizing. Rasterizing does exist in dg2d.

printed:font is two-pass, first it parses only necessary to do font selection.

dg2d demonstrate amazing text performance in its demo.

Create a future with fillText, that will go fast and avoid the infamous glyph cache red-black tree.

Possibility to fetch a ttf file data. Option to parse system fonts?

p0nce avatar May 21 '21 12:05 p0nce

Ideally, there would be some kind of "font registry", global to the UI and held by UIContext, referenced by canvases, then font can be used like in printed:canvas printed:font is a good basis for it, can parse more fonts than stb_truetype iirc

p0nce avatar Oct 13 '22 18:10 p0nce

printed:font would need to be separated to its own library and made nothrow @nogc (EDIT: and I'm thinking about this a lot)

p0nce avatar Jan 13 '23 12:01 p0nce