Skip to content

Terminal should support ANSI SGR 53 overline attribute #6000

Closed

Description

Description of the new feature/enhancement

Most recent terminal applications have extensive support for ANSI terminal commands and attributes. One extremely useful one is the overline (SGR 53) attribute that can be used for status lines and other similar uses.

Windows Terminal on Windows

Gnome Terminal on Ubuntu

Activity

  1. added
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on May 19, 2020
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 19, 2020
  3. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on May 19, 2020
  4. added
    Area-RenderingText rendering, emoji, complex glyph & font-fallback issues
    Area-VTVirtual Terminal sequence support
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    Product-ConhostFor issues in the Console codebase
    on May 19, 2020
  5. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on May 19, 2020
  6. removed
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on May 19, 2020
  7. zadjii-msft commented on May 19, 2020

    @zadjii-msft
    Member

    Yep, we probably should.I'm mildly worried that the ExtendedAttributes enum used all the flags in a BYTE, but we'll figure it out.

    enum class ExtendedAttributes : BYTE
    {
    Normal = 0x00,
    Bold = 0x01,
    Italics = 0x02,
    Blinking = 0x04,
    Invisible = 0x08,
    CrossedOut = 0x10,
    // TODO:GH#2916 add support for these to the parser as well.
    Underlined = 0x20, // _technically_ different from LVB_UNDERSCORE, see TODO:GH#2915
    DoublyUnderlined = 0x40, // Included for completeness, but not currently supported.
    Faint = 0x80, // Included for completeness, but not currently supported.
    };
    DEFINE_ENUM_FLAG_OPERATORS(ExtendedAttributes);

  8. DHowett commented on May 19, 2020

    @DHowett
    Member

    So for this one we also have the LVB gridline attributes, technically. We need to figure out how they combine with underline/overline and grid bottom/top

  9. j4james commented on May 19, 2020

    @j4james
    Collaborator

    So for this one we also have the LVB gridline attributes, technically.

    Yeah, I was just going to suggest using the COMMON_LVB_GRID_HORIZONTAL for this as a quick fix. It's no worse than our current usage of COMMON_LVB_UNDERSCORE for underline. I hacked together a quick implementation to test, and it looked OK to me. I'm not exactly sure where the overline is supposed to be rendered, but Mintty at least seems to have it at the very top of the cell. Haven't checked other implementations yet.

    As for running out of bits in ExtendedAttributes , note that the lower byte of the _wAttrLegacy word is actually unused as far as I can tell, so we should have an additional 8 bits to play around with.

  10. DHowett commented on May 19, 2020

    @DHowett
    Member

    Lower byte of ... legacy ...

    Holy crap! I never noticed this. That's clever/evil/cl-evil.

  11. zadjii-msft commented on May 19, 2020

    @zadjii-msft
    Member

    I was just going to suggest using the COMMON_LVB_GRID_HORIZONTAL for this as a quick fix

    That's brilliant and I love it

  12. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on May 21, 2020
  13. j4james commented on Jun 25, 2020

    @j4james
    Collaborator

    FYI, I've got a branch with this implemented, but it's built on top of #6506, so I'll only be able to do a PR once that's merged, which may be a while.

  14. ghost added
    In-PRThis issue has a related PR
    on Jul 2, 2020
  15. ghost closed this as completedin #6754on Jul 6, 2020
  16. ghost removed
    In-PRThis issue has a related PR
    on Jul 6, 2020
  17. ghost added a commit that references this issue on Jul 6, 2020
    70a7ccc
  18. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Jul 6, 2020
  19. DHowett commented on Aug 21, 2020

    @DHowett
    Member

    🎉 As of Windows Insider build 20197, this is also supported in the traditional console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-RenderingText rendering, emoji, complex glyph & font-fallback issuesArea-VTVirtual Terminal sequence supportIssue-TaskIt's a feature request, but it doesn't really need a major design.Product-ConhostFor issues in the Console codebaseProduct-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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions