KEMBAR78
revamp wcwidth · Issue #1467 · xtermjs/xterm.js · GitHub
Skip to content

revamp wcwidth #1467

@jerch

Description

@jerch

wcwidth needs several enhancements:

  1. interface to configure width of ambiguous chars at runtime, maybe locale dependent (see https://chromium.googlesource.com/native_client/nacl-newlib/+/master-backup/newlib/libc/string/wcwidth.c). Maybe include this into 2.
  2. interface to load widths from some kind of outer source, see Emoji skin modifiers don't work #942 (comment)
    This would make it possible to overload the default width set with some custom values. Those values could be based on backend or frontend or elseone's needs.
  3. Still in doubt - maybe merge wcwidth with future grapheme handling. Most of the wcwidth rules are a subset of the grapheme clustering. Once we have working grapheme handling merging them might save a lot of runtime. This is somewhat doubtful because grapheme handling might not work at an early stage with current cell based buffer model and should be added at a later stage (closer to the renderer). See also Grapheme support #1468.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementFeatures or improvements to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions