return false;
}
-#if !defined(QT_NO_FONTCONFIG)
- extern QMutex *qt_fontdatabase_mutex();
- QMutex *mtx = 0;
-#endif
-
bool mirrored = flags & QTextEngine::RightToLeft;
int glyph_pos = 0;
if (freetype->symbol_map) {
if ( !glyphs->glyphs[glyph_pos] ) {
glyph_t glyph;
#if !defined(QT_NO_FONTCONFIG)
- if (!mtx) {
- mtx = qt_fontdatabase_mutex();
- mtx->lock();
- }
-
if (freetype->charset != 0 && FcCharSetHasChar(freetype->charset, uc)) {
#else
if (false) {
glyphs->glyphs[glyph_pos] = uc < QFreetypeFace::cmapCacheSize ? freetype->cmapCache[uc] : 0;
if (!glyphs->glyphs[glyph_pos]) {
#if !defined(QT_NO_FONTCONFIG)
- if (!mtx) {
- mtx = qt_fontdatabase_mutex();
- mtx->lock();
- }
-
if (freetype->charset == 0 || FcCharSetHasChar(freetype->charset, uc))
#endif
{
*nglyphs = glyph_pos;
glyphs->numGlyphs = glyph_pos;
-#if !defined(QT_NO_FONTCONFIG)
- if (mtx)
- mtx->unlock();
-#endif
-
if (flags & QTextEngine::GlyphIndicesOnly)
return true;
FcResult result;
FcPattern *match = FcFontMatch(0, pattern, &result);
+ FcCharSet *charset;
if (match) {
QFontEngineFT::HintStyle default_hint_style;
} else
format = QFontEngineFT::Format_Mono;
+ FcPatternGetCharSet(match, FC_CHARSET, 0, &charset);
FcPatternDestroy(match);
} else
format = antialias ? QFontEngineFT::Format_A8 : QFontEngineFT::Format_Mono;
}
}
+ if (engine && engine->freetype && !engine->freetype->charset)
+ engine->freetype->charset = FcCharSetCopy(charset);
+
return engine;
}