Skip to content

RFC: [kcms/keyboard] tastenbrett: Force RTL diacritics to RTL

Some fonts appear to cause trouble with alignment of RTL diacritics applied to SPACE.

Many diacritics have Bidi_Class=Nonspacing_Mark, even if they belong to a RTL script. If they belong to a RTL block, append a RIGHT-TO-LEFT MARK to force RTL directionality, so they are positioned similarly to other glyphs from their same script. This shouldn't be necessary, diacritics should respect the right margin, but apparently there is some problem either in DejaVu Sans metrics, QTextLayout or somewhere else. Other fonts don't appear to be affected. Needs more investigation.

Ideally, we would use the Script_Extensions Unicode property, which provides a list of one or more scripts to which a Unicode character may belong. The Script Unicode property is usually Inherited for characters that may belong to several scripts.

As an example, U+0670 ARABIC LETTER SUPERSCRIPT ALEF has the following properties (among others):

Bidi_Class=Nonspacing_Mark Block=Arabic General_Category=Nonspacing_Mark Script=Inherited Script_Extensions=Arabic Script_Extensions=Syriac

Merge request reports

Loading