summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-10-20 13:35:27 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-25 12:53:46 +0200
commit8afc0676471b4802884ca7ee78d0097f1e5b5646 (patch)
tree0e62d61de96e80883ba06ccec7cda9f8edca5e1c /src/gui/text
parentb22d290a37903f2c5ecfe58e8183cd293ead99dc (diff)
QtGui: Remove Q_WS and qpa.
Enable compilation without -qpa. Remove QT_NO_FREETYPE and QT_NO_FONTCONFIG when building. Change-Id: I0e017cc47ee06b885be65deaeb67a449a119b8be Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase.cpp4
-rw-r--r--src/gui/text/qfontsubset.cpp27
-rw-r--r--src/gui/text/qlinecontrol.cpp10
-rw-r--r--src/gui/text/qtextlayout.cpp21
-rw-r--r--src/gui/text/text.pri117
5 files changed, 8 insertions, 171 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 740cd4c52c..52cfb8a54e 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -556,9 +556,7 @@ public:
HANDLE handle;
bool memoryFont;
QVector<FONTSIGNATURE> signatures;
-#elif defined(Q_WS_MAC)
- ATSFontContainerRef handle;
-#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
+#elif defined(Q_OS_SYMBIAN)
QString temporaryFileName;
TInt screenDeviceFontFileId;
TUid fontStoreFontFileUid;
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index cf707fe78f..de945e129b 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -45,12 +45,6 @@
#include "private/qpdf_p.h"
#include "private/qfunctions_p.h"
-
-#ifndef QT_NO_FREETYPE
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#endif
-
QT_BEGIN_NAMESPACE
static const char * const agl =
@@ -276,13 +270,6 @@ QByteArray QFontSubset::glyphName(unsigned short unicode, bool symbol)
return buffer;
}
-#ifndef QT_NO_FREETYPE
-static FT_Face ft_face(const QFontEngine *engine)
-{
- return 0;
-}
-#endif
-
QByteArray QFontSubset::glyphName(unsigned int glyph, const QVector<int> reverseMap) const
{
uint glyphIndex = glyph_indices[glyph];
@@ -292,20 +279,6 @@ QByteArray QFontSubset::glyphName(unsigned int glyph, const QVector<int> reverse
QByteArray ba;
QPdf::ByteStream s(&ba);
-#ifndef QT_NO_FREETYPE
- FT_Face face = ft_face(fontEngine);
-
- char name[32];
- name[0] = 0;
- if (face && FT_HAS_GLYPH_NAMES(face)) {
- FT_Get_Glyph_Name(face, glyphIndex, &name, 32);
- if (name[0] == '.') // fix broken PS fonts returning .notdef for many glyphs
- name[0] = 0;
- }
- if (name[0]) {
- s << '/' << name;
- } else
-#endif
if (reverseMap[glyphIndex] && reverseMap[glyphIndex] < 0x10000) {
s << '/' << glyphName(reverseMap[glyphIndex], false);
} else {
diff --git a/src/gui/text/qlinecontrol.cpp b/src/gui/text/qlinecontrol.cpp
index 3373807bd7..40452a94c2 100644
--- a/src/gui/text/qlinecontrol.cpp
+++ b/src/gui/text/qlinecontrol.cpp
@@ -1521,12 +1521,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
end(1);
}
else if (event == QKeySequence::MoveToNextChar) {
-#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER)
if (hasSelectedText()) {
-#else
- if (hasSelectedText() && m_completer
- && m_completer->completionMode() == QCompleter::InlineCompletion) {
-#endif
moveCursor(selectionEnd(), false);
} else {
cursorForward(0, visual ? 1 : (layoutDirection() == Qt::LeftToRight ? 1 : -1));
@@ -1536,12 +1531,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
cursorForward(1, visual ? 1 : (layoutDirection() == Qt::LeftToRight ? 1 : -1));
}
else if (event == QKeySequence::MoveToPreviousChar) {
-#if !defined(Q_WS_WIN) || defined(QT_NO_COMPLETER)
if (hasSelectedText()) {
-#else
- if (hasSelectedText() && m_completer
- && m_completer->completionMode() == QCompleter::InlineCompletion) {
-#endif
moveCursor(selectionStart(), false);
} else {
cursorForward(0, visual ? -1 : (layoutDirection() == Qt::LeftToRight ? -1 : 1));
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d3f8cb7cde..9756b620b7 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -61,10 +61,6 @@
#include "qfontengine_p.h"
-#if !defined(QT_NO_FREETYPE)
-# include "qfontengine_ft_p.h"
-#endif
-
QT_BEGIN_NAMESPACE
#define ObjectSelectionBrush (QTextFormat::ForegroundBrush + 1)
@@ -2109,23 +2105,6 @@ static QGlyphRun glyphRunWithInfo(QFontEngine *fontEngine, const QGlyphLayout &g
fontD->fontEngine = fontEngine;
fontD->thread = QThread::currentThread();
fontD->fontEngine->ref.ref();
-#if !defined(QT_NO_FREETYPE)
- if (fontEngine->type() == QFontEngine::Freetype) {
- QFontEngineFT *freeTypeEngine = static_cast<QFontEngineFT *>(fontEngine);
- switch (freeTypeEngine->defaultHintStyle()) {
- case QFontEngineFT::HintNone:
- fontD->hintingPreference = QFont::PreferNoHinting;
- break;
- case QFontEngineFT::HintLight:
- fontD->hintingPreference = QFont::PreferVerticalHinting;
- break;
- case QFontEngineFT::HintMedium:
- case QFontEngineFT::HintFull:
- fontD->hintingPreference = QFont::PreferFullHinting;
- break;
- };
- }
-#endif
QVarLengthArray<glyph_t> glyphsArray;
QVarLengthArray<QFixedPoint> positionsArray;
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 5e5f8e31c8..c6bdfbd9c2 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -80,14 +80,6 @@ SOURCES += \
text/qrawfont.cpp \
text/qglyphrun.cpp
-win32:!qpa {
- SOURCES += \
- text/qfont_win.cpp \
- text/qfontengine_win.cpp \
- text/qrawfont_win.cpp
- HEADERS += text/qfontengine_win_p.h
-}
-
contains(QT_CONFIG, directwrite) {
LIBS_PRIVATE += -ldwrite
HEADERS += text/qfontenginedirectwrite_p.h
@@ -106,35 +98,14 @@ unix:x11 {
text/qrawfont_ft.cpp
}
-!qpa:!x11:mac {
- HEADERS += \
- text/qfontengine_mac_p.h
- OBJECTIVE_HEADERS += \
- text/qfontengine_coretext_p.h
- SOURCES += \
- text/qfont_mac.cpp \
- text/qrawfont_mac.cpp
- OBJECTIVE_SOURCES += \
- text/qfontengine_coretext.mm \
- text/qfontengine_mac.mm
- contains(QT_CONFIG, harfbuzz) {
- DEFINES += QT_ENABLE_HARFBUZZ_FOR_MAC
- }
-}
-
-qpa {
- SOURCES += \
- text/qfont_qpa.cpp \
- text/qfontengine_qpa.cpp \
- text/qplatformfontdatabase_qpa.cpp \
- text/qrawfont_qpa.cpp
-
- HEADERS += \
- text/qplatformfontdatabase_qpa.h
+SOURCES += \
+ text/qfont_qpa.cpp \
+ text/qfontengine_qpa.cpp \
+ text/qplatformfontdatabase_qpa.cpp \
+ text/qrawfont_qpa.cpp
- DEFINES += QT_NO_FONTCONFIG
- DEFINES += QT_NO_FREETYPE
-}
+HEADERS += \
+ text/qplatformfontdatabase_qpa.h
symbian {
SOURCES += \
@@ -156,79 +127,5 @@ symbian {
LIBS += -lfntstr -lecom
}
-!qpa {
-contains(QT_CONFIG, freetype) {
- SOURCES += \
- ../3rdparty/freetype/src/base/ftbase.c \
- ../3rdparty/freetype/src/base/ftbbox.c \
- ../3rdparty/freetype/src/base/ftdebug.c \
- ../3rdparty/freetype/src/base/ftglyph.c \
- ../3rdparty/freetype/src/base/ftinit.c \
- ../3rdparty/freetype/src/base/ftmm.c \
- ../3rdparty/freetype/src/base/fttype1.c \
- ../3rdparty/freetype/src/base/ftsynth.c \
- ../3rdparty/freetype/src/base/ftbitmap.c \
- ../3rdparty/freetype/src/bdf/bdf.c \
- ../3rdparty/freetype/src/cache/ftcache.c \
- ../3rdparty/freetype/src/cff/cff.c \
- ../3rdparty/freetype/src/cid/type1cid.c \
- ../3rdparty/freetype/src/gzip/ftgzip.c \
- ../3rdparty/freetype/src/pcf/pcf.c \
- ../3rdparty/freetype/src/pfr/pfr.c \
- ../3rdparty/freetype/src/psaux/psaux.c \
- ../3rdparty/freetype/src/pshinter/pshinter.c \
- ../3rdparty/freetype/src/psnames/psmodule.c \
- ../3rdparty/freetype/src/raster/raster.c \
- ../3rdparty/freetype/src/sfnt/sfnt.c \
- ../3rdparty/freetype/src/smooth/smooth.c \
- ../3rdparty/freetype/src/truetype/truetype.c \
- ../3rdparty/freetype/src/type1/type1.c \
- ../3rdparty/freetype/src/type42/type42.c \
- ../3rdparty/freetype/src/winfonts/winfnt.c \
- ../3rdparty/freetype/src/lzw/ftlzw.c\
- ../3rdparty/freetype/src/otvalid/otvalid.c\
- ../3rdparty/freetype/src/otvalid/otvbase.c\
- ../3rdparty/freetype/src/otvalid/otvgdef.c\
- ../3rdparty/freetype/src/otvalid/otvjstf.c\
- ../3rdparty/freetype/src/otvalid/otvcommn.c\
- ../3rdparty/freetype/src/otvalid/otvgpos.c\
- ../3rdparty/freetype/src/otvalid/otvgsub.c\
- ../3rdparty/freetype/src/otvalid/otvmod.c\
- ../3rdparty/freetype/src/autofit/afangles.c\
- ../3rdparty/freetype/src/autofit/afglobal.c\
- ../3rdparty/freetype/src/autofit/aflatin.c\
- ../3rdparty/freetype/src/autofit/afmodule.c\
- ../3rdparty/freetype/src/autofit/afdummy.c\
- ../3rdparty/freetype/src/autofit/afhints.c\
- ../3rdparty/freetype/src/autofit/afloader.c\
- ../3rdparty/freetype/src/autofit/autofit.c
-
- symbian {
- SOURCES += \
- ../3rdparty/freetype/src/base/ftsystem.c
- } else {
- SOURCES += \
- ../3rdparty/freetype/builds/unix/ftsystem.c
- INCLUDEPATH += \
- ../3rdparty/freetype/builds/unix
- }
-
- INCLUDEPATH += \
- ../3rdparty/freetype/src \
- ../3rdparty/freetype/include
-
- DEFINES += FT2_BUILD_LIBRARY FT_CONFIG_OPTION_SYSTEM_ZLIB
-
-} else:contains(QT_CONFIG, system-freetype) {
- # pull in the proper freetype2 include directory
- include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
- LIBS_PRIVATE += -lfreetype
-}
-
-contains(QT_CONFIG, fontconfig) {
- CONFIG += opentype
-}
-}#!qpa
-
DEFINES += QT_NO_OPENTYPE
INCLUDEPATH += ../3rdparty/harfbuzz/src