summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qharfbuzz.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-05-10 10:31:16 +0300
committerQt by Nokia <qt-info@nokia.com>2012-05-10 11:34:25 +0200
commitcbfdec66033d14020d3e8a49bacc0d12d2b6798e (patch)
tree02e94eaad62c85f1556623b17412607102f067cb /src/corelib/tools/qharfbuzz.cpp
parent8c0048a377568b646b3b87be0b02322fce68b780 (diff)
move the default text breaking algorithm impl from HarfBuzz to Qt
there are several reasons to do this: * text breaking is not a shaper's job; * since the text breaking rules are bound to a specific Unicode version, updating Qt's internal unicode data would require updating the data in HB as well; * makes porting to HurfBuzz-NG some easier Change-Id: I0bbf8e8a343bc074696f4ddf2ae4e7fa32a61629 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/tools/qharfbuzz.cpp')
-rw-r--r--src/corelib/tools/qharfbuzz.cpp43
1 files changed, 2 insertions, 41 deletions
diff --git a/src/corelib/tools/qharfbuzz.cpp b/src/corelib/tools/qharfbuzz.cpp
index 11126b814d..97b6c1e8bb 100644
--- a/src/corelib/tools/qharfbuzz.cpp
+++ b/src/corelib/tools/qharfbuzz.cpp
@@ -39,47 +39,15 @@
**
****************************************************************************/
+#include "qharfbuzz_p.h"
+
#include "qunicodetables_p.h"
#include "qlibrary.h"
-#include "qtextcodec.h"
-
-#include "qharfbuzz_p.h"
QT_USE_NAMESPACE
extern "C" {
-HB_GraphemeClass HB_GetGraphemeClass(HB_UChar32 ch)
-{
- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ch);
- return (HB_GraphemeClass) prop->graphemeBreak;
-}
-
-HB_WordClass HB_GetWordClass(HB_UChar32 ch)
-{
- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ch);
- return (HB_WordClass) prop->wordBreak;
-}
-
-HB_SentenceClass HB_GetSentenceClass(HB_UChar32 ch)
-{
- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ch);
- return (HB_SentenceClass) prop->sentenceBreak;
-}
-
-HB_LineBreakClass HB_GetLineBreakClass(HB_UChar32 ch)
-{
- return (HB_LineBreakClass)QUnicodeTables::lineBreakClass(ch);
-}
-
-
-void HB_GetGraphemeAndLineBreakClass(HB_UChar32 ch, HB_GraphemeClass *grapheme, HB_LineBreakClass *lineBreak)
-{
- const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ch);
- *grapheme = (HB_GraphemeClass) prop->graphemeBreak;
- *lineBreak = (HB_LineBreakClass) prop->line_break_class;
-}
-
void HB_GetUnicodeCharProperties(HB_UChar32 ch, HB_CharCategory *category, int *combiningClass)
{
const QUnicodeTables::Properties *prop = QUnicodeTables::properties(ch);
@@ -135,11 +103,4 @@ void qHBFreeFace(HB_Face face)
HB_FreeFace(face);
}
-void qGetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength,
- const HB_ScriptItem *items, hb_uint32 numItems,
- HB_CharAttributes *attributes)
-{
- HB_GetCharAttributes(string, stringLength, items, numItems, attributes);
-}
-
QT_END_NAMESPACE