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

Combining diacritics misplaced when using monospace fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.5.0
    • None
    • Qt 5.5.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.2.0) on "xcb"
      OS: Arch Linux (linux version 4.1.10-2-lts)

    Description

      When displaying unicode files containing IPA characters with combining diacritics using a monospace font (such as DejaVu Sans Mono, Droid Sans Mono, ...), the combining diacritic is misplaced. Depending on the font used, the position of the combining diacritic may vary. For instance, with DejaVu Sans Mono, the diacritic is placed on the character following the combining diacritic and not on the character preceding it. With Linux Libertine Mono, the diacritic is placed on the character preceding it, but is not aligned with the character, as it is with the non-monospaced variant of the font.

      How to reproduce:
      1) Create a small application with a QLabel or another widget displaying text.
      2) Set the text of the widget to a string containing the following character sequence: ɐ̃w (LATIN SMALL LETTER TURNED A, COMBINING TILDE, LATIN SMALL LETTER W)
      3) Set the font of the widget to a monospace font, such as DejaVu Sans Mono.
      4) Compile the application and run it.
      5) When using DejaVu Sans Mono, the combining tilde is placed on the letter w. It should be displayed on the turned a. The placement is correct if the code is changed to use the DejaVu Sans font (the non-monospaced variant).

      See also the attached code and screenshot.

      This bug was originaly reported as a Kate bug in KDE (https://bugs.kde.org/show_bug.cgi?id=345930), but the issue is in Qt. The bug was not present when using another application using a 4.8 version of Qt.

      Attachments

        1. exemple-screenshot.png
          exemple-screenshot.png
          18 kB
        2. qt-exemple.pro
          0.3 kB
        3. screenshot-1.png
          screenshot-1.png
          129 kB
        4. test.cpp
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            Feufochmar Guillaume Delacourt
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes