equal
deleted
inserted
replaced
872 if (maps + 8 * numTables > endPtr) |
872 if (maps + 8 * numTables > endPtr) |
873 return 0; |
873 return 0; |
874 |
874 |
875 enum { |
875 enum { |
876 Invalid, |
876 Invalid, |
|
877 AppleRoman, |
877 Symbol, |
878 Symbol, |
878 AppleRoman, |
|
879 Unicode11, |
879 Unicode11, |
880 Unicode, |
880 Unicode, |
881 MicrosoftUnicode, |
881 MicrosoftUnicode, |
882 MicrosoftUnicodeExtended |
882 MicrosoftUnicodeExtended |
883 }; |
883 }; |
937 } |
937 } |
938 if(tableToUse < 0) |
938 if(tableToUse < 0) |
939 return 0; |
939 return 0; |
940 |
940 |
941 resolveTable: |
941 resolveTable: |
942 *isSymbolFont = (score == Symbol); |
942 *isSymbolFont = (symbolTable > -1); |
943 |
943 |
944 unsigned int unicode_table = qFromBigEndian<quint32>(maps + 8*tableToUse + 4); |
944 unsigned int unicode_table = qFromBigEndian<quint32>(maps + 8*tableToUse + 4); |
945 |
945 |
946 if (!unicode_table || unicode_table + 8 > tableSize) |
946 if (!unicode_table || unicode_table + 8 > tableSize) |
947 return 0; |
947 return 0; |
1089 }) |
1089 }) |
1090 |
1090 |
1091 const QVector<QRgb> &QFontEngine::grayPalette() |
1091 const QVector<QRgb> &QFontEngine::grayPalette() |
1092 { |
1092 { |
1093 return *qt_grayPalette(); |
1093 return *qt_grayPalette(); |
|
1094 } |
|
1095 |
|
1096 QFixed QFontEngine::lastRightBearing(const QGlyphLayout &glyphs, bool round) |
|
1097 { |
|
1098 if (glyphs.numGlyphs >= 1) { |
|
1099 glyph_t glyph = glyphs.glyphs[glyphs.numGlyphs - 1]; |
|
1100 glyph_metrics_t gi = boundingBox(glyph); |
|
1101 if (gi.isValid()) |
|
1102 return round ? QFixed(qRound(gi.xoff - gi.x - gi.width)) |
|
1103 : QFixed(gi.xoff - gi.x - gi.width); |
|
1104 } |
|
1105 return 0; |
1094 } |
1106 } |
1095 |
1107 |
1096 // ------------------------------------------------------------------ |
1108 // ------------------------------------------------------------------ |
1097 // The box font engine |
1109 // The box font engine |
1098 // ------------------------------------------------------------------ |
1110 // ------------------------------------------------------------------ |