Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-9956

QString/QChar need wcswidth/wcwidth methods

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 3.x, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.6.1, 4.6.2
    • None

      Characters can be full-width or half-width (with invisible characters being 0-width), and we need a way to know which characters are full-width or half-width.

      QString/QChar should implement columnWidth() that would return 0, 1, or 2 for the number of columns a character occupies. -1 could be used for errors.

      The biggest use case for this is to know how many columns a string would occupy in terminal applications. We cannot use QFontMetrics because we cannot reference the font the terminal application is using.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ritt.ks Konstantin Ritt
            dlee David Lee
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes