summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases
Commit message (Collapse)AuthorAgeFilesLines
* Windows Font Database: Remove usage of deprecated QSysInfo::WindowsVersionFriedemann Kleint2017-10-271-7/+2
| | | | | Change-Id: I7ba5a29c70bc8674ad77a2a3cdcc83cee6bc0c9f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-242-7/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-162-7/+1
| |\ | | | | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| | * Windows font database: Remove clamping of default font sizeFriedemann Kleint2017-10-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Partially revert a72513cab7cdfac638ef572838277aa062f1d296. The value is too small for Chinese fonts. Task-number: QTBUG-63654 Change-Id: If020bfc3044258b7abfd9d463bc9b292a9cc0839 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| | * Fix deprecated API usageJake Petroules2017-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends c1cece8e54 For some reason, this was missed in the original change. This is now outright prohibited in the watchOS 4 SDK and will cause a compilation error on that platform. Change-Id: Iaa2edf6256a54ca11dec9f1efd8a4d18ba7dc046 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-16/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Enable patent-free LCD rendering with FreeType 2.8.1Allan Sandfeld Jensen2017-10-071-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the FreeType LCD rendering path with 2.8.1 even when it has lcd- filtering disabled. This gives us proper subpixel rendering even with a freetype build with the patented lcd-filtering code disabled. The code is also simplified by removing the long pointless ifdefs for 10+ year old versions of freetype. Change-Id: I487e465317cb984b6e33c7bcc497f27cf29f9bcd Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-0/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-061-0/+20
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Windows QPA: Hardcode a limit for the default point sizeFriedemann Kleint2017-09-011-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows uses deprecated API to obtain the default font which has been observed to return bogus sizes in multi monitor setups. Apply a limit in this case and add fixme comment for Qt 6. Task-number: QTBUG-49374 Task-number: QTBUG-58610 Change-Id: I6e805ec792a3f425961a48ef4c4329c3cdf302b6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-196-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-1910-184/+184
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-312-20/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Remove QMAKE_LIBS_CORE variableJoerg Bornemann2017-08-281-1/+1
| | | | | | | | | | | | | | | | Define the lib dependencies for corelib in corelib.pro, where they belong. Change-Id: I973d3b0c571782d869b27dea243e899db4dddc43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * macOS: Fix matching of font weights for application fontsEskil Abrahamsen Blomfeldt2017-08-161-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5ad2e1cea1b2c08950c91174840f542806954d99 exposed a latent bug when matching font weights that do not exactly match any of the canonical weights in the system . It seems that when we registered the font with FontManager, it would modify the font weight to match a system weight, while we now get raw values from the font instead. So for Roboto Medium, for instance, we would now get 0.2 instead of 0.23, and since our conversion logic would convert everything between Light (-0.4) to Medium (0.23) to QFont::Normal, we would regard this as normal weight instead of medium. But on a linear scale, it makes more sense to match to the closest canonical weight instead of requiring exact matches. Note that the definition says that the middle between two weights should tend upwards, therefore we do the comparisons in decreasing order. [ChangeLog][QtGui][Text] Fixed matching of non-regular font weights for application fonts on macOS. Task-number: QTBUG-61520 Change-Id: Ieda4927c2c69ec72125257340cf06c683b031d05 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-021-2/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Windows font database: Make DirectWrite warnings more verboseFriedemann Kleint2017-07-271-2/+22
| | | | | | | | | | | | | | | | | | | | | | Output family and format error message using _comerror struct. QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed (The operation completed successfully.) becomes QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed for "8514oem": error 0x88985002 : Indicates the specified font does not exist. Change-Id: Iccd4622127d94870b4b7465a4b4fdbf34ad1c434 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Windows: Stop considering Calibri as bitmap fontEskil Abrahamsen Blomfeldt2017-07-312-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 2bc619c30ef08c9b5e2aaa3370d184670acd73ad, which tried to fix an unspecified problem by regarding all fonts with EBDT tables as potential bitmap fonts. The change log does not have any reference to a bug report or a problematic font. It also singled out Windows and GDI as the only font engine where this was necessary, which caused difference in behavior between different platforms, and even a difference in behavior on Windows when setting the hinting preference or turning on high-DPI scaling. The fact is that any font may have an EBDT table, and Microsoft has this for the smaller pixel sizes of many of their default fonts, e.g. Calibri. The result was that Qt would detect these as bitmap fonts and refuse to use distance field rendering for them. If there are fonts where it is a real problem that some glyphs only exist as bitmaps, we first need to know about them. Then we need to find some other solution than a blanket blacklist of all fonts with EBDT tables. For instance, we could separate the bitmap glyphs into their own QGlyphRuns and use native rendering only for those specific glyphs. [ChangeLog][Windows][Fonts] Some key fonts, such as Calibri, were being detected as bitmap fonts and not rendered correctly in Qt Quick. This has now been fixed. Task-number: QTBUG-62176 Change-Id: If892390cc74f180c5df9ef80484ba2eb0319f987 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-073-10/+29
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * winrt: Use styleHint as clue for fallbacks for font familiesOliver Wolff2017-06-012-3/+27
| | | | | | | | | | | | | | | | Similar on how it is done for Windows desktop we also use the given style hint when building the list of fallbacks a font family. Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Do not use FT_LOAD_TARGET_LCD when full hinting is requestedAllan Sandfeld Jensen2017-05-291-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In FreeType 2.8.0 FT_LOAD_TARGET_LCD is now a variant of FT_LOAD_TARGET_LIGHT instead of of FT_LOAD_TARGET_NORMAL. This means requesting it will get us light hinting. See https://sourceforge.net/projects/freetype/files/freetype2/2.8 We should just avoid using it all together since we request the LCD mode separately anyway with FT_RENDER_MODE later. Change-Id: I9ea2e39a6e9ba25ba11604a194e552fe4240a127 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-291-5/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/win32-g++/qmake.conf mkspecs/win32-icc/qmake.conf src/platformsupport/fontdatabases/mac/coretext.pri src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
| * Add undeclared CoreFoundation and Foundation deps to coretext.priJake Petroules2017-05-111-5/+9
| | | | | | | | | | | | | | This fixes shared library builds of Qt on iOS and tvOS. Change-Id: I29d4c7e779e51b1adc19ca9dc18bc46a45a60093 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-12/+36
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * macOS: Defer population of localized font family aliases until neededTor Arne Vestbø2017-04-212-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | Getting the localized family name of a font involves quite a bit of work internally in CoreText, e.g. creating and sorting font descriptors. By deferring population of family aliases until a font match misses we shave off ~1 second of startup time for applications that use non- localized font families (most applications). Change-Id: I021952c311c0d70d7769ccf764dbf997ebf30a4b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-207-149/+128
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Add debug operators for font database structs for easier debuggingTor Arne Vestbø2017-04-181-0/+18
| | | | | | | | | | Change-Id: Ice1b27ff93de2d369dc6b66c72a64eb05da5639c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-181-1/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| | * QFontconfigDatabase: properly parse desktop environment variableMarco Trevisan (Treviño)2017-04-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $XDG_CURRENT_DESKTOP is defined as a colon-separated list of desktop strings, thus we can't check for equality, but split it and check if it contains the desktop environments we care about. Change-Id: Ia9ab0f28654a3e1a68b918794a079f3974f85642 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
| * | QWindowsFontEngineDirectWrite: Fix build with MinGWFriedemann Kleint2017-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In member function 'void tn::QWindowsFontEngineDirectWrite::collectMetrics()': windows\qwindowsfontenginedirectwrite.cpp:361:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (table.size() >= advanceWidthMaxLocation + sizeof(quint16)) { ^ Amends 17fc188aec5806167d3c6165b0ad299a8d2a6bcf. Task-number: QTBUG-58954 Change-Id: Ice2ff135d411b55d32290069b3c85ca0b5ea09af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | macOS: Prevent leaking font data when creating QRawFont from QByteArraysTor Arne Vestbø2017-04-113-27/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CTFontCreateWithGraphicsFont has a bug causing it to never release the graphics font, which cascades down to the data provider never being released and releaseFontData never being called. Instead of relying on a callback to release the byte array font data, we attach the font data to the engine's lifetime. Note that we are still leaking the CoreFoundation types. Change-Id: I6eda4212638ccc9439b90e004222272d204c707a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | macOS: Don't marshal app font data via URL when using FreeType font engineTor Arne Vestbø2017-04-112-71/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Font descriptors can have attached attributes of any kind, not just pre- defined constants like kCTFontURLAttribute. We take advantage of this and attach the font data that was passed into addApplicationFont() to the font descriptor, so we can read it out directly when later creating an engine for it. This removes the need to build up a URL to represent the font data, which also didn't work for the memory-font use-case. The FreeType font engine now passes the same tst_QFontDatabase tests on macOS as the native CoreText font engine. This also fixes the leak caused by CTFontCreateWithGraphicsFont never releasing the graphics font, resulting in releaseFontData never being called: http://stackoverflow.com/questions/40805382/ We're now cleaning up the font data in releaseHandle, based on the attribute set on the font descriptor. Change-Id: Iba15222ec919f989e29fd98b263d9fb182c4d710 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Populate application fonts via font descriptors on Apple platformsTor Arne Vestbø2017-04-112-56/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of registering the font via CTFontManagerRegister we just create a font descriptor for the data/URL and populate that like normal system fonts. This makes the code more similar to how we deal with other fonts, shaves off a ms during font registration due to not registering the font, and fixes an issue on iOS where CTFontManagerRegister would invalidate earlier populated system font descriptors. Task-number: QTBUG-56765 Change-Id: I002a65075b15837c9a2d22573020d4c834111837 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Implement maxCharWidth() for DirectWrite engineEskil Abrahamsen Blomfeldt2017-04-112-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used to create the bounding box in QFontEngine::properties(), which in turn is used for the FontBBox when generating PDFs. The result was that the bounding width in the output was 0 and Adobe Reader complained that the PDF was malformed. We could implement the proper bounding rect in properties() at some point, instead of assuming an origin at x = 0 for instance. The metrics for that are in the head table. But for silencing the warning in Reader, just implementing the maxCharWidth() function is sufficient. [ChangeLog][Windows][PDF] Fixed a bug in PDF output when using high-dpi scaling which was causing the display of warnings when opening the file in Adobe Reader. Task-number: QTBUG-58954 Change-Id: I2540571863d4dd0f85af533b591f75dad3f0d75b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-0717-236/+212
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-062-0/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | * Copy stretch to multifont fontDefAllan Sandfeld Jensen2017-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If we do not the fontDef of the multifont will be the default 0. Task-number: QTBUG-59443 Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix stretch of QRawFontsAllan Sandfeld Jensen2017-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Set stretch to always have no transform on raw fonts. Task-number: QTBUG-59799 Change-Id: Ibfacc5c247e0b4a8410572e207f09f6e67b74f9d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix registry function link error on WindowsJason Erb2017-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added library required by registry functions called by QWindowsFontDatabase::readRegistryString. Task-number: QTBUG-59160 Change-Id: I8f6beee3cff4443c56bd835021d15122867e76e3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | macOS: Remove un-needed fontDef assignment in QCoreTextFontDatabaseTor Arne Vestbø2017-04-041-1/+0
| | | | | | | | | | | | | | | | | | | | | The QCoreTextFontEngine constructor already sets the member (like it should). Change-Id: I6e59ff36c439857418a636de4056c20d2f65e8d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | macOS: Use NSURL to resolve FreeType font names instead of CoreFoundationTor Arne Vestbø2017-04-041-28/+9
| | | | | | | | | | | | | | | Change-Id: I4b397361c483fa07e4e95288f66d7f7ea2df8d9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | macOS: Use shared code path for creating FreeType font engine for QRawFontTor Arne Vestbø2017-04-041-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The round trip via a CGFontRef to a CTFontRef so that we could pull out the kCTFontURLAttribute of the font makes no sense, as the input is just raw font data. None of the tst_QRawFont tests are able to pull out a URL, and none of the other platforms where FreeType is available resolve a filename from raw fonts. Without this change the tst_QRawFont test has 13 failed test cases and spits out 1250 QWARNs. With the patch all tests pass without warnings. Change-Id: I17965e7405d7161958ff0870825ce8190598288f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Move FreeType font engine creation for QRawFont into factory functionTor Arne Vestbø2017-04-043-48/+52
| | | | | | | | | | | | | | | | | | | | | So that the logic can be used without subclassing the FreeType font database. Change-Id: Ib1ac0e1948ce18003b8eda0c1e8fbb3c7e6c8360 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | macOS: Split out font engine creation from QCoreTextFontDatabaseTor Arne Vestbø2017-04-042-69/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Core Text font database can produce both Core Text and FreeType font engines. Refactor the code a bit so that the actual factory methods that differ between the two stand out, and do not require a granular runtime check in each method. Change-Id: Ib70f76f4a9001a8108d87c1101a50699a6ea8f55 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Share FreeType font engine creation code between platformsTor Arne Vestbø2017-04-046-57/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeType font engine setup is spread out between factory functions, constructors, and init() functions, so let's at least try to share as much as possible of it to make it easier to reason about and possibly refactor in the future. Change-Id: Ic39353d2b3111024e0589a70211bac80feb8498e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Rename QBasicFontDatabase to QFreeTypeFontDatabase which is what it isTor Arne Vestbø2017-04-0414-39/+39
| | | | | | | | | | | | | | | Change-Id: I8def2f7ae1e4c8d8a3e1f8e60549da5d691e4fb3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-042-7/+5
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| * | Rewrite FreeType-ifdef'ed function call in QCoreTextFontDatabaseTor Arne Vestbø2017-03-312-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | Makes the code slightly less awkward to deal with. Change-Id: Ie98a04d812beecfbf0d19e77b8e784db783a19d6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix CoreText font database build on watchOSJake Petroules2017-03-302-22/+3
|/ / | | | | | | | | | | | | | | | | The font database uses UIKit symbols on all UIKit platforms and thus it must be linked to. Also, limit the missing CoreText.h workaround so that it is not applied for versions of Xcode where the bug is fixed. Change-Id: Ia2a94baba6b0df618604a0bc3092fbd2a48d5aea Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-1411-14/+2590
|\| | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669