Skip to content

Texture atlas overlap in glyphs when rendering, result in ghost-boxed characters #1022

@whisperity

Description

@whisperity

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

  1. echo "%"
  2. The % looks reasonably okay, but there is a faint | at the right side:

Screenshot_20230209_101041

  1. echo "&"
  2. The "belly" of the & gets rendered into the %'s space, resulting in a broken looking glyph:

Screenshot_20230209_101110

⚠️ N.b.: This only appears on "normal" zoom level. If I do nine (9) "zoom in" actions (Ctrl + MouseWheelUp) the effect is barely noticeable:

Screenshot_20230209_101300

However, after doing another (that is, in total, ten) zoom ins, the full vertical bars come back:

Screenshot_20230209_101305

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

profile:
  master:
    font:
      size: 12
      dpi_scale: 1.0
      render_mode: lcd
      regular:
        family: "JetBrainsMono Nerd Font"
[2023-02-09 10:15:19.663721] [gui.display] TerminalWindow.resizeEvent: size 200x100 (200x100)
[2023-02-09 10:15:19.670078] [gui.display] initializeGL: size=179x100, scale=1
[2023-02-09 10:15:19.670157] [gui.display] Assigning session to terminal widget: shell=/bin/zsh, terminalSize=80x24, fontSize=12pt, contentScale=1
[2023-02-09 10:15:19.710613] [gui.display] Loading vertex shader: :/contour/display/shaders/text.vert
[2023-02-09 10:15:19.713248] [gui.display] Loading fragment shader: :/contour/display/shaders/text.frag
[2023-02-09 10:15:19.714026] [gui.display] Loading vertex shader: :/contour/display/shaders/background_image.vert
[2023-02-09 10:15:19.714070] [gui.display] Loading fragment shader: :/contour/display/shaders/background_image.frag
[2023-02-09 10:15:19.714458] [gui.display] Loading vertex shader: :/contour/display/shaders/background.vert
[2023-02-09 10:15:19.714479] [gui.display] Loading fragment shader: :/contour/display/shaders/background.frag
[2023-02-09 10:15:19.715027] [gui.display] configureAtlas: 1024x2048 RGBA
[2023-02-09 10:15:19.801055] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:19.801235] [gui.display] Blur: Loading shader source :/contour/display/shaders/blur_gaussian.frag
[2023-02-09 10:15:19.802315] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:19.802400] [gui.display] Blur: Loading shader source :/contour/display/shaders/dual_kawase_up.frag
[2023-02-09 10:15:19.802958] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:19.802994] [gui.display] Blur: Loading shader source :/contour/display/shaders/dual_kawase_down.frag
[2023-02-09 10:15:19.931259] [gui.display] Blur: Gaussian run performance: 0.226s CPU.
[2023-02-09 10:15:19.943315] [gui.display] Background image from disk: 3840x2160 RGBA
[2023-02-09 10:15:19.959257] [gui.display] [FYI] Build type          : RelWithDebInfo
[2023-02-09 10:15:19.959291] [gui.display] [FYI] Application PID     : 17300
[2023-02-09 10:15:19.959293] [gui.display] [FYI] OpenGL type         : OpenGL
[2023-02-09 10:15:19.959302] [gui.display] [FYI] OpenGL renderer     : Mesa Intel(R) Xe Graphics (TGL GT2)
[2023-02-09 10:15:19.959308] [gui.display] [FYI] Qt platform         : xcb
[2023-02-09 10:15:19.959319] [gui.display] [FYI] OpenGL version      : 4.6
[2023-02-09 10:15:19.959330] [gui.display] [FYI] Content scaling     : 1
[2023-02-09 10:15:19.959336] [gui.display] [FYI] GLSL version        : 4.60 (460, 450, 440, 430, 420, 410, 400, 330, 150, 140, 130, 120, 320 es, 310 es, 300 es, 100)
[2023-02-09 10:15:19.959367] [gui.display] [FYI] Refresh rate        : 59 Hz
[2023-02-09 10:15:19.959370] [gui.display] [FYI] Screen size         : 1920x1080
[2023-02-09 10:15:19.959375] [gui.display] [FYI] Logical DPI         : 96x96
[2023-02-09 10:15:19.959383] [gui.display] [FYI] Physical DPI        : 142x141
[2023-02-09 10:15:19.959386] [gui.display] [FYI] Device pixel ratio  : 1
[2023-02-09 10:15:19.959397] [gui.display] [FYI] Content scale       : 1
[2023-02-09 10:15:19.959406] [gui.display] [FYI] Font DPI            : 96x96 (96x96)
[2023-02-09 10:15:19.959409] [gui.display] [FYI] Font size           : 12pt (16 px)
[2023-02-09 10:15:19.959411] [gui.display] [FYI] Cell size           : 10x22 px
[2023-02-09 10:15:19.959414] [gui.display] [FYI] Page size           : 80x24
[2023-02-09 10:15:19.959416] [gui.display] [FYI] Font baseline       : 5 px
[2023-02-09 10:15:19.959418] [gui.display] [FYI] Underline position  : 3 px
[2023-02-09 10:15:19.959421] [gui.display] [FYI] Underline thickness : 1 px
[2023-02-09 10:15:20.039373] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:20.039560] [gui.display] Blur: Loading shader source :/contour/display/shaders/blur_gaussian.frag
[2023-02-09 10:15:20.040294] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:20.040353] [gui.display] Blur: Loading shader source :/contour/display/shaders/dual_kawase_up.frag
[2023-02-09 10:15:20.040712] [gui.display] Blur: Loading shader source :/contour/display/shaders/simple.vert
[2023-02-09 10:15:20.040739] [gui.display] Blur: Loading shader source :/contour/display/shaders/dual_kawase_down.frag
[2023-02-09 10:15:20.139597] [gui.display] Blur: Gaussian run performance: 0.193s CPU.
[2023-02-09 10:15:20.146300] [gui.display] Background image from disk: 3840x2160 RGBA
[2023-02-09 10:15:20.160054] [gui.display] TerminalWindow.resizeEvent: size 821x528 (821x528)
[2023-02-09 10:15:20.161423] [gui.display] Resizing view to 800x528 virtual (800x528 actual).
[2023-02-09 10:15:20.161689] [gui.display] GL configure atlas: 1024x2048 RGBA GL texture Id 4
[2023-02-09 10:15:20.176440] [gui.display] Resizing view to 800x528 virtual (800x528 actual).
[2023-02-09 10:15:20.193589] [gui.display] Screen changed.

Texture atlas with only rendering %:
texture-atlas-rgba

Texture atlas after rendering the &:
texture-atlas-rgba

Metadata

Metadata

Assignees

No one assigned

    Labels

    VT: rasterizerRendering of the terminal into a pixmap using `terminal_renderer` librarybugSomething isn't workingfontsfont rasterization and text shaping API and platform implementations

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions