summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_s60.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix S60 compileJiang Jiang2011-07-061-1/+1
|
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-06-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap_raster_symbian.cpp src/gui/image/qpixmapdatafactory.cpp src/gui/painting/qgraphicssystem.cpp src/gui/styles/qs60style.cpp src/network/bearer/qnetworkconfigmanager_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtOpenGLu.def src/s60installs/bwins/QtOpenVGu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
| * Revert "Symbian: Fix QFontInfo::pixelSize()"Alessandro Portale2011-06-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fcfc19878a0a1a48194a786bba64da11606077d2. I am happy that this commit fixed three bugs at once. But Actually, I am not sure if QTBUG-15513 should be fixed at this point. Fact is that the patch as it is would have changed the point->pixels calculation back to how it was in Qt 4.6. This means that the fonts which are defined with pointSize would now (in Qt 4.7.4) suddenly be bigger than they were in Qt 4.7.3. Imho this is unacceptable, as it would break all layouts which were developed for Qt 4.7 apps, when point size (instead of pixle size) was used. I will need to fix QTBUG-17844 without fixing QTBUG-13009 If QTBUG-13009 will be fixed for 4.8 will be discussed.
| * Proper naming for raster pixmap and paintengine on Symbian.Laszlo Agocs2011-06-161-1/+1
| | | | | | | | | | | | | | | | As QTBUG-19880 highlighted, the old S60 naming is not suitable for these classes anymore. Task-number: QTBUG-19913 Reviewed-by: Jani Hautakangas
| * Symbian: Fix QFontInfo::pixelSize()Alessandro Portale2011-06-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike QFont::pixelSize(), which may return -1 if the font size was defined in points, QFontInfo::pixelSize() always needs to return a valid value. c4ef479906f073fa84999eb950f00e264ebd4e8e which was a fix for QTBUG-13009 tried to fix a similar issue, but failed to do that properly, which resulted in QTBUG-15513 and QTBUG-17844. This commit is supposed to fix all three bugs. Task-Number: QTBUG-13009 Task-Number: QTBUG-15513 Task-Number: QTBUG-17844
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | 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
* | Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-04-281-1/+1
|\ \
| * | Long live QRawFont!Eskil Abrahamsen Blomfeldt2011-04-191-1/+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
* | | Make text rendering working outside the gui thread on Symbian.Laszlo Agocs2011-04-261-11/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | It was previously not possible to render text (QPainter::drawText) in a secondary thread on Symbian, it always resulted in some kind of panic. This patch corrects it. For S60 5.0 and earlier the behavior is not changed, threaded text rendering is only supported on Symbian^3 and newer. This also means QFontDatabase::supportsThreadedFontRendering() will return true from now on, but only on Symbian^3 and higher. Task-number: QTBUG-18516 Reviewed-by: mread
* | Merge branch 'integration'Yoann Lopes2011-02-021-0/+2
|\ \ | |/ |/| | | | | | | Conflicts: src/gui/kernel/qapplication_s60.cpp src/gui/text/qfontdatabase_s60.cpp
| * Fixes compilation when using FreeType on Symbian.Yoann Lopes2011-01-311-0/+2
| |
* | Temporary fix for ambiguous cast from four letter char constantEckhart Koppen2011-01-251-2/+2
| |
* | Avoid possible font name collisions on fbservAlessandro Portale2011-01-241-22/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTBUG-6611 implemented the long awaited app font support on Symbian. One of the problems with the underlying Symbian Api for font loading is that all fonts go into one system wide font store on fbserv. All fonts are visible to and accessible by every application. And there is no way to find out if a font is an app font and whose process' app font it is. If a font with a certain family name is already loaded on fbserv, no other application can load its font with the same family name. If two applications access the same font, bad things can happen (details: QTBUG-16514). This patch works around naming collisions on the fbserv. It also prevents Qt applications from using other Qt applications' app fonts. It does so by "marking" the name of the temporary ttf file before the file gets loaded by fbserv. All font name strings in the font's 'name' table get a marker string appended. The marker is composed by a "Q", the uid3, and on Symbian^3|PR1&below the pid. The marker length is four characters. When the QFontDatabase is populated, all own app font names are cleand from the marker, so that the Qt app can use the original font name. Other applications' app fonts are detected and filtered out of the own font database. Symbian's font Api supports only 24 characters as names for font families. The name marker reduces the effective characters to 20. The reduced name length is documented for QFontDatabase::addApplication[FontFromData] as a note. Since the app font feature is much safer now, it got re-enabled for Symbian^1 and below by reverting 25ac59fcf1bb03c9af9a2c967218c96c7c77361a . Task-number: QTBUG-16514
* | Do not load aplication fonts on Symbian^1 and belowAlessandro Portale2011-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | read http://bugreports.qt.nokia.com/browse/QTBUG-16514 for a recipy to reboot the phone just by handling with fonts. Symbian^1 is vulnerable, and Symbain^3 prevents a phone reboot. Therefore, I prefer to disable the app font feature for Symbian^1, until QTBUG-16514 us properly handled. Task-Number: QTBUG-16514
* | Supporting Qt application fonts on SymbianAlessandro Portale2011-01-191-15/+214
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch finally implements the missing application font support on Symbian. QFontDatabase's addApplicationFont[FromData], applicationFontFamilies and removeApplicationFont are now functional and allow an application to load, use and unload fonts at run-time. The underlying Symbian API comes with some restrictions/specialties. Most of them are worked around in this patch, the missing ones are left as part of QTBUG-16514: - The font file must be a file, not a memory buffer. Web fonts and qrc fonts come as memory buffers. These buffers are saved to a temporary .ttf file and the file is loaded by the underlying Symbian API. The temporary file can only be deleted after the font is unloaded. - The font file must be in a public location in order to be loadable by Symbian. It can for example not reside in the private application directory. Therefore, all application fonts (also those that are on the file system) become a temporary .ttf file in c:\temp\. - Symbian3/PR2 will come with a font table API which provides direct access to font tables. Symbian3/PR1 and below are missing this API, therefore, an own TFontStore is (ab)used to read font tables out of a font. This patch is considering both code paths in several occasions, making the Qt Symbian font implementation significantly less maintainable. - The fonts are loaded into Symbian's central font server. Loaded fonts from different processes can have colliding font typeface names (not file names) on that server. The server does not separate loaded fonts by their origin processes. Working around such collisions is part of QTBUG-16514. The number of fonts loadable at the same time by a Qt application is limited to the random value 5. Just to prevent abuse of the font server's memory. As usual, this patch was looked at by colleagues, and it was adjusted according to the feedback. But since the bus factor for the interaction of Qt's and Symbian's font systems is 1, I reviewed this patch, myself. Task-Number: QTBUG-6611 Autotest: tst_QFontDatabase::addAppFont
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Runtime dependency on Symbians Font Table APIAlessandro Portale2010-12-091-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Symbian Font Table API is a feature from (the former) Symbian^4 which will be backported into Symbian^3 in a random minor OS version. In order to keep Qt source and binary compatible between these minor versions, we cannot decide at compile time whether or not to use the new Font Table API. This patch changes many "#ifdef Q_SYMBIAN_HAS_FONTTABLE_API" into "if (symbianFontTableApiAvailable())". The Font Table feature is detected at runtime. Currently, CFeatureDiscovery is not used, because at the time of writing, that feature flag test would give false positives or false negatives. Instead, CFont::ExtendedFunction() is called with KFontGetFontTable to see if the return value is KErrNone, which indicates that the feature is available. The avalibility information gets cached, so the hack happens only once per application run. The font table Api feature comes with helper classes such as "RFontTable" and "TGetFontTableParam". But we cannot use those, because we want to stay source and binary compatible across the Symbian(^3) versions without the Font table API and those with. So, in Qt, RFontTable is simply not used and TGetFontTableParam is replicated as "QSymbianTGetFontTableParam". Same for KFontGetFontTable, KFontReleaseFontTable and later also FfFontTable. This patch has been looked at by colleagues, who verified the overall #ifdef to if() conversion, but did not feel entitled to give their official Reviewed-By for an obscure topic like Qt font support on Symbian. (It sucks to be the only creature in this universe who -kind of- knows how Qt text handling and Symbian text handling interact) Task-Number: QTBUG-15515
* Fix QFontMetrics::lineWidth() for fonts with defined point sizeAlessandro Portale2010-09-281-1/+7
| | | | | | | | | | | | | | | | | | | | QFontMetrics::lineWidth() and ::underlinePos() return value 1 regardless of the font size if the size was defined in points (instead of pixels). (On Symbian) QFontMetrics::lineWidth() calls QFontEngine::lineThickness() which uses its fontDef.pixelSize in order to come up with a suitable line width. If the QFont size was defined in points, Qt needs to make sure that fontDef.pixelSize is set accordingly. This patch adds the code to make sure that QFontEngine::fontDef always has a valid pixel size. tst_QFontMetrics::lineWidth() was added, wich failed before and passes after this patch. Task-Number: QTBUG-13009 Autotest: Passes Reviewed-By: Eskil
* Pulled code form initializeDb() out into addFontToScreenDevice()Alessandro Portale2010-09-081-52/+53
| | | | | | Preparations for Application font support on Symbian Task-Number: QTBUG-6611
* Moved font list getter to qfontdatabase_s60.cpp. Reusable.Alessandro Portale2010-09-081-0/+15
| | | | | | Preparations for Application font support on Symbian Task-Number: QTBUG-6611
* Pulled some code from One long function into a short oneAlessandro Portale2010-09-081-5/+11
| | | | | | Preparations for Application font support on Symbian Task-Number: QTBUG-6611
* Don't crash when cleaning the uninitialized fontdatabase (Symbian)Alessandro Portale2010-06-241-0/+2
| | | | | | | | | | | | Applications that do not render fonts will not cause a call to initializeDb(). In that case, there will be no creation of QSymbianFontDatabaseExtras. This fix adds a NULL-pointer check before cleaning the QSymbianFontDatabaseExtras instance. Task-number: QTBUG-11683 Reviewed-by: Miikka Heikkinen
* Fix a crash on exit. Destruction order in font database. (Symbian^4)Alessandro Portale2010-06-221-6/+15
| | | | | | | | | | | | | | | The implementation for the QT_2746 task had a wrong destruction order of font database elements. The 'QSymbianTypeFaceExtras' in Symbian^4 hold a CFont which is retrieved from the Symbian ScreenDevice. They have to be released by the same ScreenDevice. The error was that the release was attempted after the connection to the ScreenDevice was closed. This fix causes an earlier destruction of all 'QSymbianTypeFaceExtras' and the removal of their their CFonts in qt_cleanup. While the connection to the ScreenDevice is still alive. Task-number: QT_2746
* Prospective S60 build fixSimon Hausmann2010-06-131-3/+3
| | | | | | QS60Data::screenDevice() has moved from being process global to being thread local, therefore it must be accessed through the S60 macro that returns the thread-local data.
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6Simon Hausmann2010-06-131-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | src/3rdparty/webkit merged with checkout --ours Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp src/gui/kernel/qt_s60_p.h src/gui/text/qfontdatabase_s60.cpp src/script/api/qscriptengine.cpp
| * Thread safety for QFontEngineS60Shane Kearns2010-06-111-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On symbian, creating fonts requires a connection to the window server. Window server sessions are not sharable across threads. To avoid QFont crashing when used outside the GUI thread, we construct a private session to the window server when the shared CONE session is not available. (CCoeEnv::Static() uses TLS, so it returns null outside of GUI thread) The private session and screen device are stored in QThreadStorage, so they are automatically deleted when the QThread exits. Task-number: QTBUG-8874 Reviewed-by: mread
* | Using Symbian's future font table getter ApiAlessandro Portale2010-06-031-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt requires raw access to the font tables of used fonts, for a variety of reasons. Until Symbian^4, it is/was not possible to access the font tables of the fonts which are stored in Symbians Font and Bitmap Server. That's why Qt for Symbian's FontDataBase created an own TFontStore where it loaded in all installed fonts. While accessing the font tables via the own TFontStore it still uses the rasterization and metrics from the FBS, which has public Api for those things. However, loading all fonts in the own TFontStore for each Qt Gui process slows down the program startup. Symbian's future font table setter Api is very welcome and this implemets it's usage. This patch lets Qt use the new font API on Symbain^4. The font tables are retrieved via RFontTable. Task-number: QT-2746 Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Support linked fonts (.ltt) from standard font locations.Alessandro Portale2010-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal font database was only populated with .ttf and .ccc files. This patch adds .ltt as file type. Without complete font type coverage in the fontstore, we may get a mismatch in the internal association of font table and fontfamily. Most probably, this will also fix the crash on SSE Satio's. SSE seems to use .ltt files already on S60 5.0. An improvement needs to be verified by an owner of such a device, however. Task-number: QTBUG-8905 Reviewed-by: Aleksandar Sasha Babic
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-011-17/+40
|\ \ | |/
| * Fix bold text rendering of Thai and Vietnamese on SymbianAlessandro Portale2010-04-301-17/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Symbian Qt font database made the wrong assumption that a font face name maps one to one to a font. That led to a mismaptch between actual font face variants (bold) versus the retrieved font tables. S60, usually comes with two 'Series 60 Sans' font files where one is semi bold. The rasterizer plugin merges both fonts to one and returns the semi bold font if a bold font is requested, otherwise it returns the normal font. Both font files have slight differences in the cmap. Qt's font implementation always retrieved the font tables for the normal font even if it drew the bold font. That led to wrong glyphs in some languages (Thai, Vietnamese), thanks to the cmap differences. This fix makes sure that when retrieving the font tables, bold and italic are considered. It avoids innecessary double allocations of MOpenFontTrueTypeExtension instances. Also the ChunkHeap size of m_heap does now depend on the number of loaded font files. Task-number: QTBUG-6812 Reviewed-by: Aleksandar Sasha Babic
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-291-23/+23
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Renaming a few unexported, private symbolsAlessandro Portale2010-04-281-23/+23
| | | | | | | | | | | | | | | | That reduces the delta between 4.6/4.7 and a patch that I am pre- paring for Symbian^4. The renaming will help me a lot when main- taining font issues on 4.6 and 4.7 and different Symbian versions. Reviewed-by: trustme
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-301-0/+5
|\ \ | |/ | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * Adding QFontDatabase::removeAllApplicationFonts()Alessandro Portale2010-03-291-0/+5
| | | | | | | | | | | | | | | | It was missing and not covered by the standard autotests, so its missing was not detected for quite some time. Task-number: QTBUG-8423 Reviewed-By: Shane Kearns
| * Fixed filename cases to support building Qt for Symbian in LinuxMiikka Heikkinen2010-03-121-1/+1
| | | | | | | | | | | | | | Part of QtP delta reduction effort. Task-number: QT-3055 Reviewed-by: Janne Koskinen
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qtaxis2010-02-121-6/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | 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.
| * Fixed casual crash in initializeDb (Symbian)Alessandro Portale2010-02-051-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dynamic_cast should be used carefully with rvct before version 4. We found that out after the a dynamic (down)-cast from CFont* to CFbsFont* in QtGui suddenly failed. We test for (TypeUid() == KCFbsFontUid), before doing the cast. So, a static_cast is safe in this case. Also the other two dynamic_casts in qfontdatabase_s60.cpp were changed to static_cast. http://bugreports.qt.nokia.com/browse/QTBUG-7963 Task-number: QTBUG-7963 Reviewed-by: lars modified: src/gui/text/qfontdatabase_s60.cpp
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-publicaxis2010-01-211-1/+1
|\ \ | |/ | | | | | | Conflicts: mkspecs/features/symbian/platform_paths.prf
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-publicaxis2009-12-181-3/+29
|\ \ | |/ | | | | | | | | Conflicts: configure src/gui/text/qfontdatabase_s60.cpp
| * Update include path for Symbian^3Iain2009-12-031-0/+3
| | | | | | | | | | | | | | | | In Symbian^3, public and platform headers have been split. Since we're using a platform header, we need to include the new header file on Symbian versions where the new header structure is in use Reviewed-by: TrustMe
| * Fix typo in license headerAlessandro Portale2009-11-121-1/+1
| | | | | | | | | | | | The word 'module' was missing. Reviewed-By: TrustMe
| * Qt covers BC break in SymbianAlessandro Portale2009-11-101-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workaround: fntstore.h has an inlined function 'COpenFont* CBitmapFont::OpenFont()' that returns a private data member. The header will change between minor SDK versions, thus break BC. But Qt has to build on any SDK version and run on other versions of Symbian OS. Also Qt does not want to deliver that BC to Qt based apps. This hack performs the needed pointer arithmetic to get the right COpenFont* pointer, no matter if the 'Flexible Memory Model' is already supported or not. The author is not proud of this commit. Task-number: QT-2250 Reviewed-by: Iain Reviewed-by: Shane Kearns modified: src/gui/text/qfontdatabase_s60.cpp
* | Various header file inclusion fixes for rvct on linux using a case-sensitive ↵Simon Hausmann2009-10-231-3/+3
|/ | | | file system.
* Introduce native Symbian bitmap support to QPixmapJani Hautakangas2009-09-181-3/+7
| | | | | | | | | This is done to reduce heap consumption and to give a possibility to share bitmaps across process. QPixmap maps to Symbian CFbsBitmap which is stored in Symbian font and bitmap server. Reviewed-by: Jason Barron
* S60 font db more tolerant of failuremread2009-09-101-1/+6
| | | | | | | This now loads the fonts it can and asserts that at least one is loaded, rather than requiring all fonts to load. Reviewed-by: Alessandro Portale
* Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-091-4/+4
|\
| * Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me