2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2007 Red Hat, Inc.
5 * This code is a modified version of some part of HarfBuzz,
6 * an OpenType Layout engine library.
8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the
11 * above copyright notice and the following two paragraphs appear in
12 * all copies of this software.
14 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
15 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
17 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
20 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
21 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
26 * Red Hat Author(s): Behdad Esfahbod
29 #ifndef QHARFBUZZ_COPY_P_H
30 #define QHARFBUZZ_COPY_P_H
33 The purpose of this header file is to allow inclusion of the private
34 headers for font and text classes without having to pull in the full
35 harfbuzz library under QTDIR/src/3rdparty/harfbuzz/src
37 #if defined(QT_BUILD_GUI_LIB) || defined(QT_COMPILES_IN_HARFBUZZ)
38 #include <private/qharfbuzz_p.h>
44 typedef unsigned hb_bitfield;
46 typedef QT_PREPEND_NAMESPACE(quint8) hb_bitfield;
52 HB_Err_Not_Covered = 0xFFFF,
54 /* _hb_err() is called whenever returning the following errors,
55 * and in a couple places for HB_Err_Not_Covered too. */
57 /* programmer error */
58 HB_Err_Invalid_Argument = 0x1A66,
61 HB_Err_Invalid_SubTable_Format = 0x157F,
62 HB_Err_Invalid_SubTable = 0x1570,
63 HB_Err_Read_Error = 0x6EAD,
66 HB_Err_Out_Of_Memory = 0xDEAD
76 typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph;
77 typedef void * HB_Font;
78 typedef void * HB_Face;
79 typedef void * HB_FontRec;
80 typedef QT_PREPEND_NAMESPACE(quint32) hb_uint32;
81 typedef QT_PREPEND_NAMESPACE(qint32) HB_Fixed;
88 // The GlyphAttrbutes class is used inline so it needs to be complete.
90 hb_bitfield justification :4; /* Justification class */
91 hb_bitfield clusterStart :1; /* First glyph of representation of cluster */
92 hb_bitfield mark :1; /* needs to be positioned around base char */
93 hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */
94 hb_bitfield dontPrint :1;
95 hb_bitfield combiningClass :8;
98 // This struct is strictly not needed, but we replicate it completely in
99 // case the compiler tries to get clever with padding.
101 /*HB_LineBreakType*/ hb_bitfield lineBreakType :2;
102 /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */
103 /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */
104 /*HB_Bool*/ hb_bitfield wordBoundary :1;
105 /*HB_Bool*/ hb_bitfield sentenceBoundary :1;
106 hb_bitfield unused :2;
111 #endif // ifdef QT_BUILD_GUI_LIB
113 #endif // QHARFBUZZ_COPY_P_H