Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Monospaced fonts do not correctly offset the first character #1112

Open Coffee-Maker opened 3 years ago

Coffee-Maker commented 3 years ago

Left-aligned text with a monospaced font starts with an incorrect offset. The example below shows that placing a period in the middle of a sentence correctly offsets the characters after but placing it at the start of the line shortens the line's total length

2020-10-04 05 12 21

Coffee-Maker commented 3 years ago

We tried 5 fonts in total, it happened on all of them. Here is a monospaced font for reference/testing JetBrainsMono-2.001.zip

Coffee-Maker commented 3 years ago

Another test using bounding also shows that the spacing of the final character in a line is not considered correctly for wrapping.

zkxs commented 2 years ago

I've also noticed this, specifically when some of my lines start with a space and some don't. My workaround was placing an extra space before each line.