qt5base-lts/src/gui/text
Jiang Jiang 97391be5eb Allow selecting fonts with irregular style names
Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black
Condensed" can't be selected in Qt because either they don't
report correct numeric values for weight/stretch/etc. or these
values are not mapped from QFont enums in a linear way. Thus
we provide a shortcut to select these fonts with PostScript
name or full name without resorting to family name matching in
QFontDatabase (these fonts are not registered in font database
anyway). After this, we can simply use:

    QFont font("Helvetica Neue");
    font.setStyleName("UltraLight");

to select these fonts. QCoreTextFontEngineMulti matched like
this can be created directly from the CTFontRef instance
instead of creating from the font name, making this process
faster.

The commit also cleaned up the font loading process in Mac
font database a bit, moving the code for family matching into
a separate function.

Add QFontInfo::styleName() and QRawFont::styleName() to access
the resolved style name for a font.

Task-number: QTBUG-19366
Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506
Reviewed-on: http://codereview.qt.nokia.com/333
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-06-09 15:07:13 +02:00
..
qabstractfontengine_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qabstractfontengine_qws.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qabstractfontengine_qws.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qabstracttextdocumentlayout_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qabstracttextdocumentlayout.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qabstracttextdocumentlayout.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qcssparser_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qcssparser.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qcssscanner.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_mac.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_p.h Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfont_qpa.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_qws.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_s60.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_win.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont_x11.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfont.cpp Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfont.h Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontdatabase_mac.cpp Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontdatabase_qpa.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontdatabase_qws.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontdatabase_s60.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontdatabase_win.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontdatabase_x11.cpp Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontdatabase.cpp Fix build in C++0x mode 2011-05-31 17:46:40 +02:00
qfontdatabase.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_coretext_p.h Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontengine_coretext.mm Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontengine_ft_p.h Duplicate some harfbuzz symbols inside Qt. 2011-06-09 13:01:16 +02:00
qfontengine_ft.cpp Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontengine_mac_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_mac.mm Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_qpa_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_qpa.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_qpf_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_qpf.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_qws.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_s60_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_s60.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_win_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_win.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_x11_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengine_x11.cpp Fix QFontEngineX11FT compilation 2011-05-25 16:08:03 +02:00
qfontengine.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontenginedirectwrite_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontenginedirectwrite.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontengineglyphcache_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontinfo.h Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qfontmetrics.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontmetrics.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontsubset_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfontsubset.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfragmentmap_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qfragmentmap.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qglyphrun_p.h Reorder member varibles in QGlyphRunPrivate to eliminate warning 2011-06-08 12:25:23 +02:00
qglyphrun.cpp Add function QGlyphRun::setRawData() 2011-06-07 10:30:57 +02:00
qglyphrun.h Add function QGlyphRun::setRawData() 2011-06-07 10:30:57 +02:00
qharfbuzz_copy_p.h Duplicate some harfbuzz symbols inside Qt. 2011-06-09 13:01:16 +02:00
qpfutil.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qplatformfontdatabase_qpa.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qplatformfontdatabase_qpa.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qrawfont_ft.cpp Fix compile when configure with no fontconfig support 2011-06-08 12:25:21 +02:00
qrawfont_mac.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qrawfont_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qrawfont_qpa.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qrawfont_win.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qrawfont.cpp Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qrawfont.h Allow selecting fonts with irregular style names 2011-06-09 15:07:13 +02:00
qstatictext_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qstatictext.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qstatictext.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qsyntaxhighlighter.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qsyntaxhighlighter.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextcontrol_p_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextcontrol_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextcontrol.cpp Make TextEdit word selection more natural. 2011-06-01 09:36:15 +02:00
qtextcursor_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextcursor.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextcursor.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocument_p.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocument_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocument.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocument.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentfragment_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentfragment.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentfragment.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentlayout_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentlayout.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentwriter.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocumentwriter.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextengine_mac.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextengine_p.h Duplicate some harfbuzz symbols inside Qt. 2011-06-09 13:01:16 +02:00
qtextengine.cpp Fix warning in qtextengine compilation 2011-06-08 12:25:22 +02:00
qtextformat_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextformat.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextformat.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtexthtmlparser_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtexthtmlparser.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextimagehandler_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextimagehandler.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextlayout.cpp Add function QGlyphRun::setRawData() 2011-06-07 10:30:57 +02:00
qtextlayout.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextlist.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextlist.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextobject_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextobject.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextobject.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextodfwriter_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextodfwriter.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextoption.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextoption.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtexttable_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtexttable.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtexttable.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qzip.cpp Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qzipreader_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qzipwriter_p.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
text.pri Duplicate some harfbuzz symbols inside Qt. 2011-06-09 13:01:16 +02:00