summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-08-26 00:24:54 +0300
committerQt by Nokia <qt-info@nokia.com>2012-08-29 07:56:50 +0200
commit9f561f8a41660453b686d34e4c1d41e955bdadfa (patch)
treec8cba1f0e79c4254b78c14a57cb0736a5f299553 /src/3rdparty
parentf61d02deeae522c410433a3aa9929e246f413cda (diff)
Harfbuzz: fix build with NO_OPENTYPE macro defined
Remove `DEFINES += QT_NO_OPENTYPE` since there are no QT_NO_OPENTYPE guards and I'm not sure defining NO_OPENTYPE won't break some things. Change-Id: I7b36d3f200408aee99db73c56baa9b4a21cb54f9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
index 05214e7368..e62c896e8e 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h
@@ -123,6 +123,7 @@ extern void HB_IndicAttributes(HB_Script script, const HB_UChar16 *string, hb_ui
extern void HB_ThaiAttributes(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes);
+#ifndef NO_OPENTYPE
typedef struct {
hb_uint32 tag;
hb_uint32 property;
@@ -134,6 +135,7 @@ HB_Bool HB_SelectScript(HB_ShaperItem *item, const HB_OpenTypeFeature *features)
HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties);
HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool doLogClusters);
+#endif // NO_OPENTYPE
void HB_HeuristicPosition(HB_ShaperItem *item);
void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item);
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index 1024c8162f..093e8aed94 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -771,6 +771,7 @@ void HB_FreeFace(HB_Face face)
free(face);
}
+#ifndef NO_OPENTYPE
HB_Bool HB_SelectScript(HB_ShaperItem *shaper_item, const HB_OpenTypeFeature *features)
{
HB_Script script = shaper_item->item.script;
@@ -1085,6 +1086,7 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do
#endif
return true;
}
+#endif // NO_OPENTYPE
HB_Bool HB_ShapeItem(HB_ShaperItem *shaper_item)
{
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
index bfa31b1def..e0c263d426 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-tibetan.c
@@ -92,6 +92,7 @@ static const unsigned char tibetanForm[0x80] = {
#define tibetan_form(c) \
(TibetanForm)tibetanForm[c - 0x0f40]
+#ifndef NO_OPENTYPE
static const HB_OpenTypeFeature tibetan_features[] = {
{ HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
{ HB_MAKE_TAG('a', 'b', 'v', 's'), AboveSubstProperty },
@@ -99,6 +100,7 @@ static const HB_OpenTypeFeature tibetan_features[] = {
{ HB_MAKE_TAG('c', 'a', 'l', 't'), CaltProperty },
{0, 0}
};
+#endif
static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_Bool invalid)
{
@@ -216,7 +218,7 @@ HB_Bool HB_TibetanShape(HB_ShaperItem *item)
assert(item->item.script == HB_Script_Tibetan);
-#ifndef QT_NO_OPENTYPE
+#ifndef NO_OPENTYPE
openType = HB_SelectScript(item, tibetan_features);
#endif