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

Inconsistent rendering of Thai characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.2.0
    • GUI: Font handling
    • None
    • MacOSX 10.9.2, Windows 8.1, Debian Wheezy (x86_64)
    • macOS

    Description

      When rendering Thai non-spacing marker (NSM) characters - glyphs that must be combined with other characters, the rendering is inconsistent across platforms with regards to the fallback font.

      In a usual situation we don't want to render NSM without a glyph to combine with but sometimes we do need to manually paint a widget or some other task that requires a slightly lower level manipulation of how glyphs are laid out. For example, an on screen Thai keyboard.

      The fallback font renderer is inserting a circle (Unicode codepoint U+25CC) for NSM and Thai character SARA AM U+0E33 [see note below]. However, this is not consistent as explained:

      Action: set widget to font and set text to a NSM codepoint

      Expected behaviour: render most of the glyph outside of widget because it should be combined with a non NSM glyph

      Actual behaviour:
      Mac - insert circle if rendering with fallback font but not for Thai fonts
      Windows - never insert circle for Thai fonts or fallback font (EXPECTED)
      Linux - insert circle for both Thai and fallback fonts

      It looks bad if you attempt to insert your own circle for combining and aren't aware of this issue.
      [Note] SARA AM is not a NSM but must be combined with another glyph so treating it as NSM for the purposes of deciding whether to insert the circle is consistent.

      I attach a small program that can be used to explore this behaviour. Select a codepoint labelled as NSM and then change the font.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            lyndon Lyndon Hill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes