vidstige / NRasterizer

OpenType parser in pure c#
Apache License 2.0
38 stars 11 forks source link

Support for Tabs while rendering text #38

Open tocsoft opened 7 years ago

tocsoft commented 7 years ago

calling Renderer.Render(x, y, text, size. resolution) doesn't support drawing tabs.

As a simple first pass it could be updated to just switch on tabs and advance xx by n spaces widths.

vidstige commented 7 years ago

Hmm, I wonder how this works with GDI+ and similar? You would like to advance to an the space character advance width times an even multiple of a tabstop, e.g. 4.

tocsoft commented 7 years ago

Yeah that make sense... recon the tab width should be definable with some configuration options passed into the Renderer instance, could even hoist size and resolution to class wide values with it.