summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorZhang Sheng <zhangsheng@uniontech.com>2020-11-16 11:19:17 +0800
committerZhang Sheng <zhangsheng@uniontech.com>2020-11-16 12:53:37 +0000
commite13173c112b729da8f53dd2e81e8116a1ed857cf (patch)
tree49c2bce0c3349eebd0f2b62c80a1b7168ae45dc2 /src/gui/text/qfontengine.cpp
parent802e5a45baf3ac7da2cb3be06d10bdd69696fcae (diff)
Adjust code format, add space after 'if'
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 6f3734e75c..470a04638e 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1027,7 +1027,7 @@ static inline QFixed kerning(int left, int right, const QFontEngine::KernPair *p
while (left <= right) {
int middle = left + ( ( right - left ) >> 1 );
- if(pairs[middle].left_right == left_right)
+ if (pairs[middle].left_right == left_right)
return pairs[middle].adjust;
if (pairs[middle].left_right < left_right)
@@ -1041,7 +1041,7 @@ static inline QFixed kerning(int left, int right, const QFontEngine::KernPair *p
void QFontEngine::doKerning(QGlyphLayout *glyphs, QFontEngine::ShaperFlags flags) const
{
int numPairs = kerning_pairs.size();
- if(!numPairs)
+ if (!numPairs)
return;
const KernPair *pairs = kerning_pairs.constData();
@@ -1097,7 +1097,7 @@ void QFontEngine::loadKerningPairs(QFixed scalingFactor)
goto end;
// qDebug("subtable: version=%d, coverage=%x",version, coverage);
- if(version == 0 && coverage == 0x0001) {
+ if (version == 0 && coverage == 0x0001) {
if (offset + length > tab.size()) {
// qDebug("length ouf ot bounds");
goto end;
@@ -1108,7 +1108,7 @@ void QFontEngine::loadKerningPairs(QFixed scalingFactor)
if (!qSafeFromBigEndian(data, end, &nPairs))
goto end;
- if(nPairs * 6 + 8 > length - 6) {
+ if (nPairs * 6 + 8 > length - 6) {
// qDebug("corrupt table!");
// corrupt table
goto end;
@@ -1250,7 +1250,7 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy
break;
}
}
- if(tableToUse < 0)
+ if (tableToUse < 0)
return nullptr;
resolveTable:
@@ -1339,7 +1339,7 @@ quint32 QFontEngine::getTrueTypeGlyphIndex(const uchar *cmap, int cmapSize, uint
Since 0xffff is never a valid Unicode char anyway, we just get rid of the issue
by returning 0 for 0xffff
*/
- if(unicode >= 0xffff)
+ if (unicode >= 0xffff)
return 0;
quint16 segCountX2;
@@ -1433,7 +1433,7 @@ quint32 QFontEngine::getTrueTypeGlyphIndex(const uchar *cmap, int cmapSize, uint
if (!qSafeFromBigEndian(cmap + 12 * middle, end, &startCharCode))
return 0;
- if(unicode < startCharCode)
+ if (unicode < startCharCode)
right = middle - 1;
else {
quint32 endCharCode;