summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Memory and file descriptor leak in QFontCacheSimon Yuan2014-05-141-60/+42
| | | | | | | | | | | | Make the cache also use the ref counts Make everyone who decrements a ref count check for 0 and delete Move all cache logic to the cache Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff Task-number: QTBUG-38035 Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use the correct system font on OS X Mavericks.Jake Petroules2013-11-111-0/+2
| | | | | | | Task-number: QTBUG-32789 Change-Id: I7b1988d5f74e5becd2e02274fae4d2bcc8140901 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* 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>
* Doc: Fixed qdoc warnings.David Boddie2011-08-151-2/+3
|
* Only compare styleNames if they are not emptyJiang Jiang2011-06-271-1/+1
| | | | Task-number: QTBUG-19366
* Add styleName to QFontDef comparisonJiang Jiang2011-06-251-0/+1
| | | | | | | To make sure we cache different font engines with different style names. Task-number: QTBUG-19366
* Allow selecting fonts with irregular style namesJiang Jiang2011-06-101-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* 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-19/+7
| | | | | | | | | | | | | | 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
* Introduce QFontEngineDirectWriteEskil Abrahamsen Blomfeldt2011-03-141-0/+102
| | | | | | | | | | | | | | | | Make a font engine for subpixel positioned text on Windows Vista (with platform update) and Windows 7. If selected during configuration, the engine will be selected only when the hinting preference of a font is set to None or Vertical hinting. The font database uses most of the same logic but creates a direct write font based on the LOGFONT rather than a GDI handle. The engine is currently regarded as experimental, meaning that code using it should do substantial testing to make sure it covers their use cases. Task-number: QTBUG-12678 Reviewed-by: Jiang Jiang
* Resolve font alias before testing for exact matchingJiang Jiang2011-02-281-0/+3
| | | | | | | | | It is required in X11 for resolving some default substitutions like 'sans', 'serif', etc. It also provides stub to implement similar replacement in other platforms like Windows. Task-number: QTBUG-15575 Reviewed-by: Eskil
* 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-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'qt/4.7' into lighthouse-4.7Paul Olav Tvete2010-07-141-0/+9
|\| | | | | | | | | | | | | Conflicts: src/gui/image/image.pri src/gui/image/qpixmapdatafactory.cpp src/gui/painting/qgraphicssystem.cpp
| * Add three new style-hints to QFont to match CSS' generic font familiesTor Arne Vestbø2010-07-081-0/+9
| | | | | | | | | | | | | | | | The defaults were chosen to match major web browsers. See: http://xhva.net/log/?p=160 Reviewed-by: Simon Hausmann
* | Renamed files from *_lite* to *_qpa*Jørgen Lind2010-06-241-1/+1
| |
* | Say hello to Q_WS_QPA!Jørgen Lind2010-06-241-3/+3
| | | | | | | | Rename Q_WS_LITE -> Q_WS_QPA
* | Merge remote branch 'qt/4.7' into lighthousePaul Olav Tvete2010-06-181-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/qws.conf src/corelib/io/qresource.cpp src/gui/image/qpixmapdata_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontdatabase.cpp src/opengl/qgl_p.h src/plugins/mediaservices/gstreamer/gstreamer.pro
| * Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-0/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| | * Fixed QFont to respect the italics constructor flag.Trond Kjernåsen2010-05-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a QFont with the constructor that takes the italic bool flag didn't work properly, since the property wasn't set to be resolved. It may be that the property should *always* be resolved, but to minimize impact, it's only done now if you pass in 'true' for italics. Reviewed-by: Eskil
* | | Merge remote branch 'qt/4.7' into lighthouse-4.7Paul Olav Tvete2010-05-101-3/+2
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/egl/egl.pri src/gui/painting/qwindowsurface_p.h
| * | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-291-3/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All EGL-related changes from 4.6 were discarded. Conflicts: src/gui/egl/egl.pri src/gui/egl/qegl.cpp src/gui/egl/qegl_p.h src/gui/egl/qegl_stub.cpp src/gui/egl/qeglproperties_p.h src/gui/egl/qeglproperties_stub.cpp src/gui/gui.pro src/multimedia/multimedia/audio/qaudioinput_win32_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| | * Fixed a QFontEngine leak for QFont objects used in threads.Trond Kjernåsen2010-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only the QFontCache object for the main thread was cleared when the the application exited, or a thread was destroyed. This caused font engine references to hang around and never get deleted. Task-number: QTBUG-3976 Reviewed-by: Brad
| | * Clear QFontCache TLS content before nullifying TLS pointer.Janne Koskinen2010-04-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | If not cleared server handles are left open causing Font Server to Panic with KErrInUse in Symbian. Task-number: QTBUG-9565 Reviewed-by: Simon Hausmann
* | | Merge remote branch 'origin/4.7' into lighthouseJørgen Lind2010-04-211-5/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/kernel/qapplication.cpp src/gui/painting/qbackingstore.cpp src/opengl/qgl.cpp src/opengl/qgl_p.h src/plugins/plugins.pro tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir tools/tools.pro
| * | doc: Clarify effect of QFont::NoFontMergingEskil Abrahamsen Blomfeldt2010-04-131-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been reports of several people who expect QFont::NoFontMerging to turn off all automatic resolution of fonts when displaying text. However, the flag only turns off automatic font resolution within a script item. Suitable fonts for scripts not supported by the current font are still picked automatically. We cannot change the behavior of QFont::NoFontMerging, so the documentation has been made clearer and task QTBUG-9816 has been created to implement a new style strategy flag that supports the use case. Task-number: QTBUG-1732 Reviewed-by: Trond
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7Janne Koskinen2010-04-081-0/+2
| |\ \
| | * | Add QFont::ForceIntegerMetrics style strategy flagEskil Abrahamsen Blomfeldt2010-03-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebKit uses integers internally to deal with positioning and sizing of text objects, but on Mac, Qt uses floating point values. This caused a discrepancy between the size used by WebKit to position text objects and the actual size of the objects when rendered by Qt. The problem was so bad that it has been holding back fixes for other bugs in the mac font engine since these would make the WebKit bug more visible. To work around the problem, we introduce a StyleStrategy flag in QFont which allows you to force the use of integers all over the line. This makes text rendering slightly different from native applications, but should fix several issues with WebKit on Mac. The WebKit-part of this patch will be submitted up-stream. Reviewed-by: Simon Hausmann Reviewed-by: Prasanth
| * | | Clear QFontCache TLS content before nullifying TLS pointer.Janne Koskinen2010-04-081-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | If not cleared server handles are left open causing Font Server to Panic with KErrInUse in Symbian. Task-number: QTBUG-9565 Reviewed-by: Simon Hausmann
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qtaxis2010-02-121-2/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/makefile.cpp qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro Conflict resolution was heavily based on manual application of commit 9cc4ae77a73bd28ff495f36f26dd87c78b76b976.
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-publicaxis2010-01-211-4/+11
| |\ \ | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/symbian/platform_paths.prf
| * \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-publicaxis2009-12-181-1/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/text/qfontdatabase_s60.cpp
| * \ \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-11-061-7/+7
| |\ \ \ \
| * | | | | Various header file inclusion fixes for rvct on linux using a case-sensitive ↵Simon Hausmann2009-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | file system.
* | | | | | Renamed createWindowSurfaceForWindowJørgen Lind2010-04-211-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to createWindowSurface. Gave also a default dpi when there is no platform integration, ie. it has not been initialised yet or is being initialised.
* | | | | | QPlatformScreen now has default implementation for physicalSizeJørgen Lind2010-04-191-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assuming dpi = 100. This also simplifies minimal slightly. Also use propper apis in qfont for default dpi by using QPlatformScreen
* | | | | | Merge remote branch 'qt/4.7' into lighthouse-4.7Paul Olav Tvete2010-03-011-2/+3
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/egl/qegl.cpp src/gui/kernel/qdnd_p.h
| * | | | | Clarify QFont::rawName() docs.Trond Kjernåsen2010-02-101-2/+3
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Task-number: related to QTBUG-8038 Reviewed-by: Kim
* | | | | Merge remote branch 'remotes/qt/4.6' into lighthousePaul Olav Tvete2010-02-101-1/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure tests/auto/qwidget/tst_qwidget.cpp
| * | | | Fix tst_qmlgraphicstext::letterSpacing tst_qmlgraphicstext::wordSpacing Sent ↵Warwick Allison2010-01-141-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for review into 4.6. Task-number: QTBUG-7326 Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>
* | | | | Merge remote branch 'origin/4.6' into lighthousePaul Olav Tvete2010-01-141-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/global/qglobal.cpp src/gui/dialogs/dialogs.pri
| * | | | Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * | | | Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | |_|/ | | |/| | | | | | | | | | | | Reviewed-by: Trust Me
| * / | | fix release mode crash in qfont.cpp initFontSubst() on Windows mobileJoerg Bornemann2010-01-111-2/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we've disabled LTCG for Windows CE by default, the code in initFontSubst() crashes on Windows mobile. Adding the extra const solves this problem. Task-number: QTBUG-6641 Reviewed-by: ossi
* | | | Merge remote branch 'origin/4.6' into lighthousePaul Olav Tvete2009-11-191-8/+10
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/graphicssystems/graphicssystems.pro