| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | QFontEngineMultiFontConfig::QFontEngineMultiFontConfig(QFontEngine *fe, int script) | - | ||||||
| 6 | : QFontEngineMulti(fe, script) | - | ||||||
| 7 | { | - | ||||||
| 8 | } executed 763 times by 123 tests: end of blockExecuted by:
| 763 | ||||||
| 9 | - | |||||||
| 10 | QFontEngineMultiFontConfig::~QFontEngineMultiFontConfig() | - | ||||||
| 11 | { | - | ||||||
| 12 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(cachedMatchPatterns)>::type> _container_((cachedMatchPatterns)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (FcPattern *pattern = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||
| 13 | if (pattern
| 105-597 | ||||||
| 14 | FcPatternDestroy(pattern); executed 105 times by 7 tests: FcPatternDestroy(pattern);Executed by:
| 105 | ||||||
| 15 | } executed 702 times by 7 tests: end of blockExecuted by:
| 702 | ||||||
| 16 | } executed 757 times by 127 tests: end of blockExecuted by:
| 757 | ||||||
| 17 | - | |||||||
| 18 | bool QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int at, uint ucs4) const | - | ||||||
| 19 | { | - | ||||||
| 20 | bool charSetHasChar = true; | - | ||||||
| 21 | FcPattern *matchPattern = getMatchPatternForFallback(at - 1); | - | ||||||
| 22 | if (matchPattern != 0
| 0-308 | ||||||
| 23 | FcCharSet *charSet; | - | ||||||
| 24 | FcPatternGetCharSet(matchPattern, "charset", 0, &charSet); | - | ||||||
| 25 | charSetHasChar = FcCharSetHasChar(charSet, ucs4); | - | ||||||
| 26 | } executed 308 times by 5 tests: end of blockExecuted by:
| 308 | ||||||
| 27 | - | |||||||
| 28 | return executed 308 times by 5 tests: charSetHasChar;return charSetHasChar;Executed by:
executed 308 times by 5 tests: return charSetHasChar;Executed by:
| 308 | ||||||
| 29 | } | - | ||||||
| 30 | - | |||||||
| 31 | - | |||||||
| 32 | FcPattern * QFontEngineMultiFontConfig::getMatchPatternForFallback(int fallBackIndex) const | - | ||||||
| 33 | { | - | ||||||
| 34 | ((!(fallBackIndex < fallbackFamilyCount())) ? qt_assert("fallBackIndex < fallbackFamilyCount()",__FILE__,69) : qt_noop()); | - | ||||||
| 35 | if (fallbackFamilyCount() > cachedMatchPatterns.size()
| 16-292 | ||||||
| 36 | cachedMatchPatterns.resize(fallbackFamilyCount()); executed 16 times by 5 tests: cachedMatchPatterns.resize(fallbackFamilyCount());Executed by:
| 16 | ||||||
| 37 | FcPattern *ret = cachedMatchPatterns.at(fallBackIndex); | - | ||||||
| 38 | if (ret
| 105-203 | ||||||
| 39 | return executed 203 times by 3 tests: ret;return ret;Executed by:
executed 203 times by 3 tests: return ret;Executed by:
| 203 | ||||||
| 40 | FcPattern *requestPattern = FcPatternCreate(); | - | ||||||
| 41 | FcValue value; | - | ||||||
| 42 | value.type = FcTypeString; | - | ||||||
| 43 | QByteArray cs = fallbackFamilyAt(fallBackIndex).toUtf8(); | - | ||||||
| 44 | value.u.s = reinterpret_cast<const FcChar8 *>(cs.data()); | - | ||||||
| 45 | FcPatternAdd(requestPattern, "family", value, true); | - | ||||||
| 46 | FcResult result; | - | ||||||
| 47 | ret = FcFontMatch(0, requestPattern, &result); | - | ||||||
| 48 | cachedMatchPatterns.insert(fallBackIndex, ret); | - | ||||||
| 49 | FcPatternDestroy(requestPattern); | - | ||||||
| 50 | return executed 105 times by 5 tests: ret;return ret;Executed by:
executed 105 times by 5 tests: return ret;Executed by:
| 105 | ||||||
| 51 | } | - | ||||||
| 52 | - | |||||||
| 53 | - | |||||||
| Switch to Source code | Preprocessed file |