cerjones / dg2d

Boost Software License 1.0
19 stars 4 forks source link

Test render speed of 1 glyph #8

Closed vitalfadeev closed 3 years ago

vitalfadeev commented 3 years ago

Test 1 glyph render: GDI vs DG2D: https://github.com/vitalfadeev/dtest-glyph

cerjones commented 3 years ago

Hi, font support is very basic as its literally just whats needed to read from a font file and get text on screen. There's a bunch of easy things that can be done to make it faster, caching the glyphs, pre-flattening them. I think a 4x speed up is easily achievable, its a fair bit of work but all simple stuff. I also have ideas for a more involved optimisation that would require a new rasterizer just for fonts. I have the actual algorithm worked out and I'd expect maybe a 2x speed up from that.

So short version is 4x speed up will come at some point, and more later on.