summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine_p.h
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2014-02-11 02:26:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-03 11:10:50 +0100
commit25e34dadabe844099885045c0e53c8136508698a (patch)
treecf699008ac85fc549a0e00c73401895b88c41039 /src/gui/text/qtextengine_p.h
parentead6cc40df7d6cede49c58bc9ce3c461a068afce (diff)
Hide the justification algorithm implementation details
The justification "classes" stored in the glyph attributes are actually a justification priorities suitable for a particular language (script). The external API only uses the justification metrics array calculated on top of these priorities. Change-Id: I5b0a39e35954084c63a798b632fd6108f9ae7608 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qtextengine_p.h')
-rw-r--r--src/gui/text/qtextengine_p.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 1616a78937..06075eb992 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -95,28 +95,14 @@ typedef unsigned q_hb_bitfield;
typedef quint8 q_hb_bitfield;
#endif
-typedef struct {
- typedef enum {
- NoJustification= 0, /* Justification can't be applied after this glyph */
- Arabic_Space = 1, /* This glyph represents a space inside arabic text */
- Character = 2, /* Inter-character justification point follows this glyph */
- Space = 4, /* This glyph represents a blank outside an Arabic run */
- Arabic_Normal = 7, /* Normal Middle-Of-Word glyph that connects to the right (begin) */
- Arabic_Waw = 8, /* Next character is final form of Waw/Ain/Qaf/Fa */
- Arabic_BaRa = 9, /* Next two chars are Ba + Ra/Ya/AlefMaksura */
- Arabic_Alef = 10, /* Next character is final form of Alef/Tah/Lam/Kaf/Gaf */
- Arabic_HaaDal = 11, /* Next character is final form of Haa/Dal/Taa Marbutah */
- Arabic_Seen = 12, /* Initial or Medial form Of Seen/Sad */
- Arabic_Kashida = 13 /* Kashida(U+640) in middle of word */
- } JustificationClass;
-
- q_hb_bitfield justification :4; /* Justification class */
- q_hb_bitfield clusterStart :1; /* First glyph of representation of cluster */
- q_hb_bitfield mark :1; /* needs to be positioned around base char */
- q_hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
+struct QGlyphAttributes {
+ q_hb_bitfield justification :4;
+ q_hb_bitfield clusterStart :1;
+ q_hb_bitfield unused1 :1;
+ q_hb_bitfield unused2 :1;
q_hb_bitfield dontPrint :1;
- q_hb_bitfield combiningClass :8;
-} QGlyphAttributes;
+ q_hb_bitfield unused3 :8;
+};
// this uses the same coordinate system as Qt, but a different one to freetype.
// * y is usually negative, and is equal to the ascent.