summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qharfbuzz_copy_p.h
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-08-26 04:09:09 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-22 00:47:40 +0200
commitceb9a8232ca0fe9bc823b61ee3ca8bcdc0aa01c5 (patch)
treed088f6fa8e4025b75ddd034240c74fb987fd7ebe /src/gui/text/qharfbuzz_copy_p.h
parented5fe1b95e818101d00e9415d8881ac836c505eb (diff)
A step out from Harfbuzz (reduce dependency)
Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt (in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm which has been moved from HB to Qt (well, most of it)). Rename some members to better reflect their meaning, remember to keep HB_CharAttributes in sync with QCharAttributes. Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct that will be replaced with a more efficient/friendly solution a bit later. The soft hyphen and the mandatory break detection has been factored out of the default text breaking algorithm to a higher level in order to refactor the QCharAttributes bitfields and to optimize the implementation for the common case. Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qharfbuzz_copy_p.h')
-rw-r--r--src/gui/text/qharfbuzz_copy_p.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h
index aa48667e2e..75b1240c3d 100644
--- a/src/gui/text/qharfbuzz_copy_p.h
+++ b/src/gui/text/qharfbuzz_copy_p.h
@@ -66,13 +66,6 @@ typedef enum {
HB_Err_Out_Of_Memory = 0xDEAD
} HB_Error;
-typedef enum {
- HB_NoBreak,
- HB_SoftHyphen,
- HB_Break,
- HB_ForcedBreak
-} HB_LineBreakType;
-
typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph;
typedef void * HB_Font;
typedef void * HB_Face;
@@ -95,17 +88,6 @@ typedef struct {
hb_bitfield combiningClass :8;
} HB_GlyphAttributes;
-// This struct is strictly not needed, but we replicate it completely in
-// case the compiler tries to get clever with padding.
-typedef struct {
- /*HB_LineBreakType*/ hb_bitfield lineBreakType :2;
- /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */
- /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */
- /*HB_Bool*/ hb_bitfield wordBoundary :1;
- /*HB_Bool*/ hb_bitfield sentenceBoundary :1;
- hb_bitfield unused :2;
-} HB_CharAttributes;
-
}
#endif // ifdef QT_BUILD_GUI_LIB