tig / winprint

winprint 2.0 - Advanced source code and text file printing. The perfect tool for printing source code, web pages, reports generated by legacy systems, documentation, or any text or HTML file. It works interactively or from the command line making it great for single users or whole enterprises. Works great with Powershell.
https://tig.github.io/winprint/
MIT License
74 stars 5 forks source link

Sourcecode and HTML CTE do not render space accurate; esp for fixed-pitch #14

Closed tig closed 4 years ago

tig commented 4 years ago

When rendering fixed-pitch content, the width of empty tags and spaces is being rendered/calculated correctly (in GDIPlusContainer.cs) resulting in fixed pitch content looking like crap:

image

I'm confident this is a bug in my code, because the same HTML renders in litebrowser correctly.

Workaround for source code: Use the "text/plain" Content Type Engine by specifying --content-type-engine text/plain or -e content-type-engine text/plain on the command line. No syntax highlighting, but at least text will wrap correctly.

tig commented 4 years ago

Fixed via AnsiCte/Pygments!