summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_mac.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Backport writingSystems support code for Cocoa from Qt 5Jiang Jiang2011-12-011-2/+52
| | | | | | | Mark writingSystems support based on languages from Core Text. Task-number: QTBUG-20996 Reviewed-by: Morten Sorvig
* Fix localized font family access in OS XJiang Jiang2011-11-081-3/+23
| | | | | | | | | | | | | | | | | | | Font family names listed in QFontDatabase::families() should be localized names rather than their default (English) names, to be consistent with behaviors in other Mac apps and previous Qt/Mac based on ATS. It should also be possible to verify if a font exists with any family name, regardless it's localized or not. Say we have font "Hiragino Mincho Pro", which has a Japanese name called "ヒラギ ノ明朝 Pro", then db.hasFamily(QString::fromUtf8("ヒラギノ明朝 Pro")) should return true. Task-number: QTBUG-22372 Reviewed-by: Morten Sorvig
* Fix QFont related compilation errors on Mac OSX CarbonSamuli Piippo2011-11-011-2/+2
| | | | | | | Task-number: QTBUG-22318 Merge-request: 1434 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Move styleName out of QtFontStyle::KeyJiang Jiang2011-07-061-3/+3
| | | | | | Makes the code clearer and more explicit. Reviewed-by: Eskil
* Store styleName in font databaseJiang Jiang2011-07-041-0/+2
| | | | | | | | | | | | | | | | So that queries like QFontDatabase::styles() can return exactly the same styles as the system does. Then application can use QFont::setStyleName() to select those styles later. With a lot of fonts not providing correct numeric weight/width values and even if they did, values are usually not directly mapped to QFont enums, styleName is probably the only reliable way to select any possible font in the system. Task-number: QTBUG-13518 Change-Id: Id8a9469b804f1b5bb81d8c7378e7e8778f9a4fff Reviewed-on: http://codereview.qt.nokia.com/739 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Merge remote-tracking branch 'origin/4.8'Olivier Goffart2011-06-241-58/+84
|\
| * Allow selecting fonts with irregular style namesJiang Jiang2011-06-101-58/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 97391be5ebddc62545ddb88f92fc2045bfa10711)
* | move some internal helper functions from qglobal.cpp to qcore_mac*Ritt Konstantin2011-06-091-2/+0
|/ | | | | | | | | | | | | namely: void qt_mac_to_pascal_string(const QString &s, Str255 str, TextEncoding encoding = 0, int len = -1); QString qt_mac_from_pascal_string(const Str255 pstr); OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref); OSErr qt_mac_create_fsspec(const QString &file, FSSpec *spec); remove relevant "extern" declarations all over the Qt sources Merge-request: 2615 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Long live QRawFont!Eskil Abrahamsen Blomfeldt2011-04-191-1/+6
| | | | | | | | | | | | | | The QGlyphs API was initially attempted with a bastardization of QFont which was meant to encapsulate a single, physical font instance (a QFontEngine) where a set of glyph indexes would make sense. This is not how QFont was intended to be used, and it caused several issues. At the same time, the requirement for loading a font from ttf/otf data and be able to access it and use it without polluting the rest of the process with the font arose. To support these two APIs we introduce QRawFont, which is an abstraction on top of a single physical font. Done-with: Jiang Jiang
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Moving QCoreTextFontEngine with related classes into own fileJørgen Lind2010-10-281-0/+2
| | | | | | | | | | | | The declaration of QCoreTextFontEngine was ifdefed in qfontengine_p.h. So was QMacFontEngine. I have moved them into their own files (qfontengine_coretext_p.h and qfontengine_mac_p.h).
* | Fix crash in Mac font loadingJiang Jiang2010-09-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | Commit f2f6330d915cbe3d0989ad280738ed0a6954cd35 introduced an extra CFRelease of QCFString, which will cause crash. Also, since we are not refering to ATS font in Cocoa code anymore, conversion of CTFontRef to CGFontRef should not rely on platform fonts, we use CTFontCopyGraphicsFont to get the corresponding CGFontRef directly. Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Fix Core Text font loading for certain Mac FontsJiang Jiang2010-09-101-23/+22
| | | | | | | | | | | | | | | | | | | | | | Font names enumerated by Core Text cannot be found by ATSFontFamilyFindFromName because ATS is expecting native names instead of the names returned by Core Text. This patch get rid of ATS font matching code in Cocoa code path to simplify the code, avoid deprecation warnings (in the future) and fix this issue. Task-number: QTBUG-11145 Reviewed-by: Eskil
* | Clean up and clarify Mac font engine codeJiang Jiang2010-08-311-74/+1
|/ | | | Reviewed-by: Eskil
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Improve font handling on Mac/Cocoa.Morten Sorvig2009-09-161-0/+31
| | | | | | | | | | | | | | | | | | The Mac/Cocoa font database currently relies on two APIs, ATSUI (old) and CoreText (new). These are interchangable and work on the same font database. Some differences do exist, in particular ATSFontFamilyGetName seems to return the same as ATSFontGetName for some fonts - the font name, not the family name. In any case, the old ATS code path is initializing QFontDatabase::familes() with the font name. This causes a naming mismatch with code that uses CoreText and gets the proper family name, in this case in initializeDb(). The fix is to make sure the correct family name is used by using the CoreText API to access it. RevBy: TrustMe
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Update license headers.Jason McDonald2009-08-111-1/+1
| | | | Reviewed-by: Trust Me
* Compile.Norwegian Rock Cat2009-06-231-1/+1
| | | | Mismatch in preprocessor my previous commit.
* Remove some warnings in the Cocoa build.Norwegian Rock Cat2009-06-231-0/+2
| | | | | | | | | | After discussing with some of the Objective-C people I have finally got a fair number of the warnings to disappear in both 10.5 and 10.6. I also took the opportunity to remove a bunch of other warnings. Reviewed by: Morten Sørvig
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* BT: Remove duplicate code and fix font parsing.Norwegian Rock Cat2009-06-021-8/+1
| | | | | | | | | | | QFont has a feature that you can pass a comma-separated list and it will walk through the list and match the font that it hits first. There's a nice static function that X11 and Windows uses, but the Mac was using an older copied version of it. This old version didn't handle quoting which is what happens in the style sheet. So, using the same code makes everything work well. As a bonus, Creator looks correct again. Reviewed-by: Simon Hausmann
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+509