-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texture atlas overlap in glyphs when rendering, result in ghost-boxed characters #1022
Comments
culprit is this function contour/src/vtrasterizer/TextRenderer.cpp Line 358 in 2d490c8
Info from debug on cutting sizes
|
oh very nice catch @Yaraslaut. the question is how do we want to fix this. we could add a 1px padding in between the texture atlas tiles. I think I have no better idea as of right now.
okay, horizontally from 11 down to 10 makes sense. this might be the reason why it was triggered anyways. but 13 to 21 looks like THE bug here? hmmm 🤔 |
I tried disabling this thing and didn't notice any changes, so I wonder why this is required in the first place? Shouldn't harfbuzz create properly aligned buffer ? |
you mean FreeType. yeah, but some glyphs are wider, some are tinner (horizontally and vertically). The glyphs that are horizontally wider, must be cut down to avoid accidentally writing into a tile in the texture atlas that belong to a different bitmap. On the other hand, we have the tile splitting functionality that e.g. is used to still render programming ligatures correctly - so why do we end up cutting in that function in the first place. 🤔 |
Agree, adding 1 px sound like a good idea, since i noticed that disabling this function does not solve the problem completely |
Contour Terminal version
0.3.10.4591
Installer source
Github: CI actions
Operating System
Ubuntu 20.04
Architecture
x86-64
Other Software
(Irrelevant.)
Steps to reproduce
echo "%"
%
looks reasonably okay, but there is a faint|
at the right side:echo "&"
&
gets rendered into the%
's space, resulting in a broken looking glyph:However, after doing another (that is, in total, ten) zoom ins, the full vertical bars come back:
Restoring to default zoom (Ctrl+0) restores the visuals seen in step 4.zoom-ins
Expected Behavior
Characters do not expect each others' rendering.
Actual Behavior
Ugly glyphs.
Additional notes
Texture atlas with only rendering %:
Texture atlas after rendering the
&
:The text was updated successfully, but these errors were encountered: