Skip to content

Block Elements not rendering correctly with AtlasEngine enabled #14098

Description

Windows Terminal version

1.16.2642.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

In PowerShell with the default Cascadia Mono font, run: Write-Host "`u{2595}`u{2594}`n`u{2595}`u{2581}"

Expected Behavior

In version 1.15.2525.0 or 1.16.2642.0 with AtlasEngine disabled:
image

Actual Behavior

The top is cut off:
image

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Sep 28, 2022
  2. Dan-Albrecht commented on Sep 28, 2022

    @Dan-Albrecht
    MemberAuthor

    Might be same underlying issue as #14022

  3. lhecker commented on Sep 28, 2022

    @lhecker
    Member

    Note to self/team: The block character scaling technique in _getCachedGlyphLayout is inherently flawed as I realized yesterday. What it does is:

    • Get the glyph's advance width/height
    • Resize to match the cell size

    This doesn't work with fonts that use side bearings for block characters. A better way would be to assume that all fonts that define any block character also probably define the U+2588 Full Block character. That way we can do:

    • Get the font's full block glyph
    • Get the actual size including side bearings of the full block
    • Resize to match the cell size but apply the scale to the given glyph instead
  4. ghost added
    In-PRThis issue has a related PR
    on Sep 29, 2022
  5. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Sep 30, 2022
  6. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Sep 30, 2022
  7. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Oct 12, 2022
  8. ghost closed this as completedin #14099on Oct 17, 2022
  9. ghost added a commit that references this issue on Oct 17, 2022
    97abc3d
  10. ghost removed
    In-PRThis issue has a related PR
    on Oct 17, 2022
  11. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Oct 17, 2022
  12. Dan-Albrecht commented on Oct 19, 2022

    @Dan-Albrecht
    MemberAuthor

    Leonard Hecker (@lhecker), while I agree your change is correctly called righer-er, I think we need a even-more-righter followup as my issue is not resolved. I'm built from source at bfd480b. U+2594 seems to be causing problems and doesn't seem to be in the torture test.

    Write-Host "`u{2595}`u{2594}`n`u{2595}`u{2581}"
    Write-Host "`nXXX`n`u{2594}`nXXX`n"
    

    Atlas Off:
    image

    Atlas On:
    image

  13. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Oct 19, 2022
  14. lhecker commented on Oct 19, 2022

    @lhecker
    Member

    Dan Albrecht (@Dan-Albrecht) Somewhat "late" in the development cycle I changed the algorithm so that it doesn't touch characters found in the given user font. My intention was that glyphs in the user's font remain untouched. If we don't do that this leads to other display issues (incorrect alginment, etc.). U+2594 is part of Cascadia Mono and so it won't get "adjusted" to fit the cell and I forgot to re-test it as part of the PR, focusing only on Consolas, etc.

    Not sure what to do about this issue now: I should try to see if it helps to round up ascend/descend after all. But I'm not certain we can merge that - people have complained in the past when I did that. Otherwise we'll either have to wait for the next big AtlasEngine update which brings support for overlapping glyphs, or support for line height adjustments (which I'm submitting tomorrow).

  15. added a commit that references this issue on Dec 1, 2022
    cd367e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-AtlasEngineIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions