skyjake / lagrange

A Beautiful Gemini Client
https://gmi.skyjake.fi/lagrange/
BSD 2-Clause "Simplified" License
1.19k stars 62 forks source link

Text rendering issue: Letters with tails (g, j, q, y, etc) appear cut off #590

Open willow385 opened 1 year ago

willow385 commented 1 year ago

Notice how in this screenshot: image the letters that have "tails" (that go below the line) have them cut off, causing "y" to look like "v", "g" to look like "ɑ", etc. Even causes commas to look like periods.

Steps to reproduce: Open any Gemini page with the following configuration Lagrange version: 1.15.7 OS: MS Windows version 10.0.19044.2728 Machine: Lenovo Thinkpad T490s Font preferences: Iosevka (compact) with smoothing enabled

This bug appears to affect all pages with MIME type text/gmi regardless of path or domain. Unclear if other types of pages are affected. No idea what version was the first to have this bug but it has been present since I installed Lagrange about a month ago. If any further details are needed please let me know.

skyjake commented 1 year ago

This is actually an old text rendering issue (same as #364) where the backgrounds of overlapping text lines erase some of the previously rendered text. The correct fix here would be to first do all the backgrounds of a paragraph and then draw the characters without a background.

The reason why this occurs with the compact Iosevka font is that it modifies line height to be shorter than normal. The workaround is to use fonts where the line height is not reduced (e.g., non-compact Iosevka).

You should also check if your "Line spacing" setting has been modified. Values less than 1.00 may make this issue more prominent.