summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-06-14 12:45:01 (GMT)
committerLars Knoll <lars.knoll@nokia.com>2010-06-14 12:54:08 (GMT)
commit249442f44ac5ffabc91276307f8ae7a749f74eb1 (patch)
tree32edeba93b21773668f89dfacbf03e441bbbd7b2 /src/corelib/tools
parent9d8723745d19985409548f47da85a45c15ce5b0e (diff)
downloadQt-249442f44ac5ffabc91276307f8ae7a749f74eb1.zip
Qt-249442f44ac5ffabc91276307f8ae7a749f74eb1.tar.gz
Qt-249442f44ac5ffabc91276307f8ae7a749f74eb1.tar.bz2
Fix issues with thai line breaking
Merge latest harfbuzz: commit cce760d41f115fecd5b9b6b20b62883b10a9c204 Author: Lars Knoll <lars.knoll@nokia.com> Date: Mon Jun 14 14:14:59 2010 +0200 Fixes for thai linebreaking * Load libthai.so.0 since libthai.so is not there on all systems * Remove dependency on codecs. Unicode->TIS620 is so simple we can simply hardcode it in harbuzz-thai.c * Speed up detection of word boundaries * Falback when libthai is not found is now to not break instead of breaking after every character (in line with recommendations from unicode.org linebreaking algorithm) Reviewed-by: Simon Hausmann Adapt qharfbuzz.cpp to the changes in harfbuzz. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qharfbuzz.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/corelib/tools/qharfbuzz.cpp b/src/corelib/tools/qharfbuzz.cpp
index 1b6d334..9166a14 100644
--- a/src/corelib/tools/qharfbuzz.cpp
+++ b/src/corelib/tools/qharfbuzz.cpp
@@ -102,45 +102,15 @@ HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch)
return QChar::mirroredChar(ch);
}
-void *HB_Library_Resolve(const char *library, const char *symbol)
+void *HB_Library_Resolve(const char *library, int version, const char *symbol)
{
#ifdef QT_NO_LIBRARY
return 0;
#else
- return QLibrary::resolve(QLatin1String(library), symbol);
+ return QLibrary::resolve(QLatin1String(library), version, symbol);
#endif
}
-void *HB_TextCodecForMib(int mib)
-{
-#ifndef QT_NO_TEXTCODEC
- return QTextCodec::codecForMib(mib);
-#else
- return 0;
-#endif
-}
-
-char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength)
-{
-#ifndef QT_NO_TEXTCODEC
- QByteArray data = reinterpret_cast<QTextCodec *>(codec)->fromUnicode((const QChar *)unicode, length);
- // ### suboptimal
- char *output = (char *)malloc(data.length() + 1);
- Q_CHECK_PTR(output);
- memcpy(output, data.constData(), data.length() + 1);
- if (outputLength)
- *outputLength = data.length();
- return output;
-#else
- return 0;
-#endif
-}
-
-void HB_TextCodec_FreeResult(char *string)
-{
- free(string);
-}
-
} // extern "C"
QT_BEGIN_NAMESPACE