Use DirectWrite font engine for non-ttf fonts as well

DirectWrite supports different font types, not just TTF. In order
to enable e.g. CFF support, we simply remove the test for TTF
which was initially put in to be on the safe side when handling
bitmap fonts. However, using DirectWrite with bitmap fonts also
seems to work fine, so there's no reason to have the fallback.

Task-number: QTBUG-22654
Change-Id: I8572bc421ab3dd223025ea152ba9b33f7cf33a8a
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2012-07-10 11:33:25 +02:00 committed by Qt by Nokia
parent e316519c0e
commit a620b77896

View File

@ -1758,9 +1758,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &requ
ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE; ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE;
SelectObject(hdc, oldObj); SelectObject(hdc, oldObj);
if (!ttf || !useDirectWrite) { if (!useDirectWrite) {
useDirectWrite = false;
if (hfont && (!ttf || request.stretch != 100)) { if (hfont && (!ttf || request.stretch != 100)) {
DeleteObject(hfont); DeleteObject(hfont);
if (!res) if (!res)