summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-09-10 22:00:11 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-10 22:00:11 (GMT)
commitfd570dca1319cd92daf0f73b10ea4e090ea15c23 (patch)
tree9de1035b83cd857340e30e82e781f80cd1abc6ef /src/gui/text
parent99e4ba7cb0700eb1a68d6db9fa8d058ddb59f233 (diff)
parent3dc18b19ee2a02b93cc509a9162bf0a3900c6fd0 (diff)
downloadQt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.zip
Qt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.tar.gz
Qt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_win.cpp3
-rw-r--r--src/gui/text/qstatictext.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 82de0d5..ef1b504 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -1296,6 +1296,7 @@ QFontEngineMultiWin::QFontEngineMultiWin(QFontEngineWin *first, const QStringLis
engines[0] = first;
first->ref.ref();
fontDef = engines[0]->fontDef;
+ cache_cost = first->cache_cost;
}
void QFontEngineMultiWin::loadEngine(int at)
@@ -1317,6 +1318,8 @@ void QFontEngineMultiWin::loadEngine(int at)
engines[at] = new QFontEngineWin(fam, hfont, stockFont, lf);
engines[at]->ref.ref();
engines[at]->fontDef = fontDef;
+
+ // TODO: increase cost in QFontCache for the font engine loaded here
}
QT_END_NAMESPACE
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index b950b13..7a5dec4 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -448,7 +448,6 @@ namespace {
currentItem.font = ti.font();
currentItem.charOffset = m_chars.size();
currentItem.numChars = ti.num_chars;
- currentItem.numGlyphs = ti.glyphs.numGlyphs;
currentItem.glyphOffset = m_glyphs.size(); // Store offset into glyph pool
currentItem.positionOffset = m_glyphs.size(); // Offset into position pool
currentItem.useBackendOptimizations = m_useBackendOptimizations;
@@ -463,8 +462,8 @@ namespace {
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
int size = glyphs.size();
- Q_ASSERT(size == ti.glyphs.numGlyphs);
Q_ASSERT(size == positions.size());
+ currentItem.numGlyphs = size;
m_glyphs.resize(m_glyphs.size() + size);
m_positions.resize(m_glyphs.size());