summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Make QtQuick2 compile on QPAEskil Abrahamsen Blomfeldt2011-04-271-0/+2
| | | | | | | | | | | Moved the logic to set pixel size into the font engines to avoid making the platform plugin interface too complex, and added a function in QPA to make an isolated font engine based on font data. Currently none of the QPA back-ends supports it, but it compiles and spits out a warning if you try to create a QRawFont from data there. This isn't used in QtQuick2 anyway. Reviewed-by: Jiang Jiang
* Long live QRawFont!Eskil Abrahamsen Blomfeldt2011-04-151-4/+1
| | | | | | | | | | | | | | 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
* Fix positioning in GL2 paint engine with subpixel antialiasingJiang Jiang2011-04-041-1/+1
| | | | | | | | | | | | In this case we will use QTextureGlyphCache with FreeType renderer, which requires the subpixel positition to get correct left bearings, thus alphaMapBoundingBox is extended to support subPixelPosition. In QFontEngineFT we also simplify the code a bit by reusing loadGlyphs for metrics calculation instead of duplicate code. Since we need to use the glyphs after all, cache them here in alphaMapBoundingBox shouldn't be a problem. Reviewed-by: Eskil
* Introduce QFontEngineDirectWriteEskil Abrahamsen Blomfeldt2011-03-141-0/+2
| | | | | | | | | | | | | | | | 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
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doc: Fixing typoSergio Ahumada2011-01-071-1/+1
| |
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtGunnar Sletta2010-11-191-0/+2
|\ \ | | | | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm src/gui/text/qfontengine_p.h
| * | Fix for font engines that don't support subpixel positioningJiang Jiang2010-11-111-1/+2
| | | | | | | | | | | | Reviewed-by: aavit
| * | Support glyph subpixel positioning without subpixel renderingJiang Jiang2010-11-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously subpixel positioning was only used when subpixel rendering is enabled (glyphType == Raster_RGBMask), however, it does not necessarily require that and for Mac OS X it will keep using subpixel positioning even when LCD font smoothing (subpixel rendering) is turned off. To maintain consistency when switching to raster, we should support subpixel positioning in this case. Task-number: QTBUG-5053 Reviewed-by: Jørgen Lind
* | | Moving QCoreTextFontEngine with related classes into own fileJørgen Lind2010-10-281-210/+0
|/ / | | | | | | | | | | 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).
* | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-261-1/+1
|\ \ | | | | | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp
| * \ Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-251-1/+1
| |\ \ | | |/
| | * Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
| | |
* | | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-221-0/+13
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/text/qfontengine_ft.cpp
| * | Fix text position with OpenGL engine and FreetypeEskil Abrahamsen Blomfeldt2010-10-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you use the OpenGL engine, the left bearing of the glyph was incorrectly retrieved from the system as the glyph was queried with the wrong format, and adjustments for antialiasing were not applied. To make the position identical to painting with, new API was added to QFontEngine (The bounding box of a glyph is also not logically necessarily the same thing as the bounding box of the rasterized glyph.) Done-with: Trond Task-number: QTBUG-14410
* | | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-051-0/+2
|\ \ \ | |/ / | | | | | | | | | Conflicts: src/gui/painting/qpdf.cpp
| * | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-051-0/+2
| |\ \ | | |/
| | * Moving QPdf::stripSpecialCharacter to fontengineJørgen Lind2010-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | It is only used by the fontengines. This is one of the steps to make it easier to make fontengines build outside of QtGui. Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtGunnar Sletta2010-09-271-6/+7
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: configure src/corelib/global/qglobal.h
| * | Fix Core Text font loading for certain Mac FontsJiang Jiang2010-09-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Support sub pixel positioning of glyphs in raster engineEskil Abrahamsen Blomfeldt2010-09-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the raster engine to provide the same quality of text rendering as the native engine on Mac Cocoa, we need to support rendering to different sub pixel positions for each glyph. The number of subpixel positions is arbitrary and has to be detected, but it's usually three or four. Each position will give slightly different coverages inside the pixel and thus different rasterizations. Other font engines which support sub pixel positioning of glyphs can provide the same functionality by implementing supportsSubPixelPositions() to return true, and then adding the subPixelPosition argument to the x coordinate used in alphaRGBMapForGlyph(). Task-number: QTBUG-5053 Reviewed-by: Jiang Jiang
* | | Merge remote branch 'lighthouse/4.7' into lighthouse-masterPaul Olav Tvete2010-09-131-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/text.pri src/plugins/generic/linuxinput/qlinuxinput.cpp
| * \ \ Merge branch 'qt-4.7' into lighthouse-4.7Paul Olav Tvete2010-09-131-0/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | Conflicts: configure src/corelib/tools/qsimd.cpp
| * | | Initial pluggable fontdatabaseJørgen Lind2010-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformFontDatabase added. QPlatformIntegration now has a new virtual function: QPlatformDatabase::fontDatabase() const. Most unix platform plugins wants to follow the pattern implemented in directfb, linuxfb, vnc etc. In the pro file do: include(../fontdatabases/genericunix/genericunix.pri) In the QPlatformIntegration class do: and instansiate a QGenericFontDatabase in the constructor and return it in the getter function.
* | | | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-09-131-0/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/global/qglobal.h src/corelib/tools/qsimd.cpp
| * | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-301-0/+1
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| | * | Correct last right bearing in boundingBox(glyphs)Jiang Jiang2010-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 07880542ecc479807c23c5646d263135240822ff introduced regression to QFontMetrics::boundingRect and QTextEngine::boundingBox on FT, XLFD and QPF font engine. Because on these platforms, rightBearing of the last glyphs is already removed from the width returned in glyph_metrics_t. Subtracting that rightBearing twice will cause the resulting boundingBox smaller than expected. This patch fix this by removing last right bearing accounting code from generic QTextEngine::boundingBox, instead, we put it into font engines that need them: QFontEngineWin, QCoreTextFontEngine, QFontEngineMac, QFontEngineS60 and QFontEngineQWS. So that the resulting width should be correct on all platforms without introducing any performance penalties. Task-number: QTBUG-6854, QTBUG-12950 Reviewed-by: Eskil
* | | | Merge remote branch 'remotes/lighthouse/4.7' into lighthouse-masterPaul Olav Tvete2010-07-191-1/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| Conflicts: src/opengl/qgl_p.h
| * | Say hello to Q_WS_QPA!Jørgen Lind2010-06-241-1/+1
| | | | | | | | | | | | Rename Q_WS_LITE -> Q_WS_QPA
| * | Merge remote branch 'qt/4.7' into lighthousePaul Olav Tvete2010-06-181-1/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.7' into lighthouseJørgen Lind2010-04-211-0/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * \ \ Merge remote branch 'origin/4.6' into lighthousePaul Olav Tvete2010-01-141-9/+9
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/global/qglobal.cpp src/gui/dialogs/dialogs.pri
| * \ \ \ Merge remote branch 'origin/4.6' into lighthousePaul Olav Tvete2009-11-191-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/graphicssystems/graphicssystems.pro
| * \ \ \ \ Merge branch '4.6' into lighthousePaul Olav Tvete2009-09-301-4/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/image/qpixmapdatafactory.cpp src/gui/kernel/qapplication_p.h src/gui/painting/qgraphicssystem.cpp
| * | | | | | Please welcome the Lighthouse Research Project!Paul Olav Tvete2009-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lighthouse is a lighter, nimbler version of Qt/Embedded, which does not contain a window system. Instead, it uses graphics system plugins to provide the necessary functionality or interface with existing window systems. The first version was written by Rhys. Squashed commit.
* | | | | | | Make QFontEngineGlyphCache explicitly sharedEskil Abrahamsen Blomfeldt2010-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngine will delete its glyph cache (and if it's a GL engine, its texture) when the font engine dies. The font engine can die when the QFontCache decides to clean it up, e.g. based on the trigger of a timer. To make it possible to use the glyph cache elsewhere, without interference by the font cache, it has been made explicitly shared. Reviewed-by: Kim
* | | | | | | New class: QGlyphsEskil Abrahamsen Blomfeldt2010-06-041-1/+8
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce an API to access glyph indexes in a font directly. A bug was discovered during this work, where different hinting flags in loadGlyph() and loadGlyphMetrics() would make the metrics in the two functions different, thus causing drawCachedGlyphs() (which uses loadGlyphMetrics() indirectly) to use different metrics than the standard drawTextItem() code path (which uses loadGlyph()). The bug was visible in the tst_QGlyphs::drawExistingGlyphs() test. Reviewed-by: Simon Hausmann
* | | | | | Fix platform regression: Support QFont::setStretch() on CocoaEskil Abrahamsen Blomfeldt2010-05-191-1/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFont::setStretch() would previously have no effect on Mac OS X/Cocoa. Task-number: QTBUG-10585 Reviewed-by: Eskil Done-by: Andy
* | | | | Recommit 1ebeb971d3382aec0fff927Eskil Abrahamsen Blomfeldt2010-03-221-0/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 725c2c29c192349016b1332824a7716bbb992f31 which reverted the original commit because of a test failure on qws. This recommit adds a test for whether the metrics from QFontEngine::boundingBox() are valid, which is required for the bearings to be calculated. This test was also in the original logic.
* | | | Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-101-9/+9
| | | | | | | | | | | | | | | | Reviewed-by: Eskil
* | | | Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-091-2/+2
| |_|/ |/| | | | | | | | Reviewed-by: Eskil
* | | Fixed bad glyph rendering under cocoaGunnar Sletta2009-10-191-1/+2
| |/ |/| | | | | | | | | The positioning is still wrong, but now it at least the glyphs are ok Reviewed-by: msorvig
* | Update license headers again.Jason McDonald2009-09-091-4/+4
|/ | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * 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
* | Merge commit 'qt/master'Jason Barron2009-08-131-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | Replace some mentions of Trolltech with more appropriate terms.Jason McDonald2009-08-121-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me