summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-04-02 10:31:52 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-04-04 10:25:10 +0000
commitd1bab5b1e3d28c0e2925ad3208cea785af755d54 (patch)
tree59e5004041b945113c2c157da0b039f8cc2968bf /examples
parenta334156e81ab2491b3f65ee3c7a8269912c26a0c (diff)
Allow word break wrapping in Korean text
In Korean text, they typically can use both the "Western" style of word wrapping, i.e. breaking on spaces, as well as the East-Asian style of potentially breaking between all syllables. However, the Unicode Line Breaking Algorithm, TR14 defaults to breaks on syllables and specifies a possible tailoring where Hangul is mapped to the AL class instead: "When Korean uses SPACE for line breaking, the classes in rule LB26, as well as characters of class ID, are often tailored to AL" When using Qt, the user would expect the WordWrap wrap mode to break between words in Korean. If you want the syllable-based text layout, you would use WrapAnywhere, probably accompanied by line justification. To avoid breaking QTextBoundaryFinder and other potential clients of QUnicodeTools which depend on getting the precise Unicode data from the algorithm, we do this by passing a flag from QTextEngine when initializing the attributes. This way, it can also be made optional later on, if we decide there is a reason to add an additional wrap mode specifically to handle cases like this. [ChangeLog][Important Behavioral Change] WrapWord now correctly prefers line breaks between words in Korean text. WrapAnywhere can still be used to get breaks between syllables instead. Done-with: Alexey Turitsyn <alexey.turitsyn@lge.com> Task-number: QTBUG-47644 Change-Id: I37b45cea2995db7fc2b61e3a0cc681bbdc334678 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions