summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz
Commit message (Collapse)AuthorAgeFilesLines
* Fix thai symbol rendering slownessKonstantin Ritt2014-11-221-1/+3
| | | | | | | | | | | Harfbuzz is constantly trying to load libthai in src/3rdparty/harfbuzz/src/harfbuzz-thai.c, making rendering of thai symbols very slow. Task-number: QTBUG-37665 Change-Id: I30a2a5489271534eeacc205d8106b22130c40c5f (cherry picked from qtbase/47e6ec0736aa129e181e0b6f02cec884f9832432) Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Harfbuzz: backporting fixes from upstreamAhmed Saidi2013-04-187-14/+23
| | | | | | | | | | | | | | | 81c8ef785b079980ad5b46be4fe7c7bf156dbf65 Fix crash! 81f2ecafa19b602f950df5a9e6e1b99c4b5ea55e Bug 30319 ff0612c2e7df1b86fc702c72e3015a6a5ae39b4c and 2dbd0fd11799c18bb6c66e337c3e31a1419823d4 Fix OOB access possibility 3bebe289aace6daa84b3d6983cebf5c58ddfad78 Fix problem with Indic shaper and control chars 90138e5a4d15c44f05456f90083ecacdc3196c8e Fix bad memory access in Myanmar shaper b847f24ce855d24f6822bcd9c0006905e81b94d8 Fix Arabic cursive positioning 3ab7b37bdebf0f8773493a1fee910b151c4de30f Fix misc leaks Change-Id: I6f3a6253782bff6abe4bf741d11c09fdd67542db (cherry picked from qtbase/7df995a9bd3e989b4136f98424490604eb5178aa) Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Harfbuzz-thai - fix buffer overflow when setting item attributesJohn Tapsell2012-03-141-2/+7
| | | | | Change-Id: I19eeb4ec25a7c6cb3f584e6290169f9f327b8713 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Harfbuzz GPOS hinting- do not consider a subtable to be invalid if it is ↵John Tapsell2012-03-121-0/+3
| | | | | | | | | | | | just empty Considering a subtable to be invalid when it was empty meant that it returned an error causing all further hinting to be aborted. This means that we get no hinting in certain cases with certain fonts. Change-Id: I840c016dc85935b4f2c4373c66a79b4bd8b3a30d Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePositionJohn Tapsell2012-03-041-13/+35
| | | | | | | | | | | | | | After shaping in HB_OpenTypePosition, when we come to calculate the new logClusters array we have to take into account that the glyphs passed in are not a 1 to 1 correspondance with the original string, because some shaping might have already been done. So we must use the old logClusters values (stored in tmpLogClusters) to map from the glyphs passed in back to the original string. This fixes visual word wrapping problems in thai Change-Id: I384dfa98f0946e9e074728f89542acb2b6b6bc27 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix for Thai characters with a below markMarko Kenttala2012-02-282-1/+7
| | | | | | | | | | | Some Thai characters with a mark below got drawn under fonts descent causing them to be clipped in some situations. Added checking for this and use of lower offset if needed. Task-Number: ou1cimx1#979179 Change-Id: If9fb643d4dee24342215a637c805d52b78584333 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Harfbuzz-thai: Hide ZWJ and ZWNJ characters and show Inherited charactersJohn Tapsell2012-02-101-3/+8
| | | | | | | | | | | | | | | | | | | | | | Thai is not supposed to have ZWJ and ZWNJ characters or any other of the Inherited Unicode Scripts (http://www.verisigninc.com/assets/idn-inherited-unicode-script.pdf) - they don't have a mapping to the thai encoding tis620 which libthai requires. However it is an unfortunate fact that there are many websites etc that liberally place these ZWJ and ZWNJ characters throughout thai text to force word boundaries, so we must also deal with them. We deal with all Inherited characters by mapping them to the invalid code ~0 in tis620 encoding, following what libthai does internally in its own tis620 encoding functions, and then replacing this character with the original unicode and setting dontPrint to true to hide the ZWJ and ZWNJ characters. Includes a unit test to check the behaviour. Change-Id: I49e44da6e39443daa832e7f50c94804e13deabb4 Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Harfbuzz-thai - When calling HB_OpenTypePosition we must set doLogClusters ↵John Tapsell2012-02-101-1/+1
| | | | | | | | | | to true for thai This bug resulted in word wrapping not working correctly for thai. Change-Id: I676deb12258beb224736414712a32e23513f406e Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Harfbuzz-thai - fix to_tis620 function for latin charactersJohn Tapsell2012-02-091-1/+1
| | | | | | | | | This was an obvious typo - a missing "else" in a group of if statements. Change-Id: Iaa58e761ebdff86d4e0bc19113162f380a311f63 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix height of some Thai charactersMarko Kenttala2012-02-071-0/+28
| | | | | | | | | | | | | | Some Thai characters with two above glyphs were higher than fonts ascent. This caused them to be clipped in for example qtcomponents buttons. Added checking for this and calculation of new lower offset between glyphs if needed. Task-Number: ou1cimx1#898104 Change-Id: I6eff058cbe5fe92a01ac1ad10ee351fe8ed78e67 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Merilä <sami.merila@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Fix isolated Thai SARA AM handlingJiang Jiang2012-01-181-7/+26
| | | | | | | | | | | | | | Since 5e07a3ac58f93bd5e09715d43b58c20950c2befa Thai text layout is handled by libthai to special case of the SARA AM. It didn't handle isolated SARA AM. This patch fixed it and added detailed explaination on the special case. The dotted circle should be shown rather than hidden. Added a test case to verify that with Waree. Change-Id: I4967715627cbe15f5a3e9ab3e3844420ab541aed Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-12-073-40/+352
|\ | | | | | | | | Conflicts: src/s60main/newallocator_hook.cpp
| * Fix HarfBuzz Thai character SARA AM handlingJiang Jiang2011-11-303-40/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is contributed by Thanomsub Noppaburana from libthai. It added a special thai shaping function to handle SARA AM character for fonts without OpenType rules to support it, like Nokia Pure Text AS. With modification to logClusters assignment to make sure that QTextLine::glyphRuns(int from, int length) returns correct glyphs. Task-number: QTBUG-21206 Change-Id: I5a78ee1ab2b4c874c7d0df17d4ee6d264ed5a790 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Harfbuzz shaper: kerning adjustment does not need to be modified by RTLJohn Tapsell2011-10-271-1/+1
| | | | | | | | | | Merge-request: 1435 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-201-0/+3
|\ \ | |/ | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
| * Check for buffer overflow in Lookup_MarkMarkPosJiang Jiang2011-07-191-0/+3
| | | | | | | | | | | | | | | | That may cause crash in this function with certain fonts. Task-number: QTBUG-17238 Done-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Jiang Jiang
* | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-05-041-0/+1
|\ \ | |/
| * Don't rely on uninitialized dataJoão Abecasis2011-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | HB_GetCharAttributes used to require a zero-initialized array for attributes, as it selectively sets relevant bits for each character. We ease that requirement by always initializing the attributes buffer explicitly with memset. Task-number: QT-4911 Reviewed-by: Ritt Konstantin
* | Implement subpixel positioning with FreeTypeJiang Jiang2011-03-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngineFT are used in raster/OpenGL paint engine and QGLWidget, also in Symbian, etc. We want to make sure it works well in raster and QGLWidget first. Regardless subpixel antialiasing (LCD filtering) is enabled or not (though it does look better when subpixel antialiasing is on). We also need to support transformations. The tricky part here is that, under X11, we have a different code path for QFontEngineFT and other font engines in raster engine, which uses QFontEngineFT's own glyph cache system. While in other platforms (Windows and Mac) and QGLWidget, we will use the generic QTextureGlyphCache. The generic QTextureGlyphCache already has support for subpixel positions, this solution is ported to QFontEngineFT for its QGlyphSet: the key for QGlyphSet hash table has been extended from glyph_t to <glyph_t, QFixed subPixelPosition> pair. The real work to enable subpixel positioning with FreeType is in fact really simple, we just set the horizontal translation to the subpixel position * 64 (FreeType uses a coordinate system of 1/64 of a pixel resolution internally) immediately before loading the glyph. A slight tweek to bitmap width is applied when we are getting the bitmap ourselves instead of using FT_Render_Glyph to accommodate the subpixel translation, which will only be used in non-LCD filtering cases (grayscale antialiasing). From what we have observed, FreeType can generate different bitmaps for at least 12 different subpixel positions (each with a slight difference). To limit the memory consumption, we restrict the number of subpixel positions to be 4 (hardcoded), which should be good enough for most low resolution displays. Subpixel positioning (and fractional glyph advances) will only be enabled when the hintingPreference for the font being used is PreferNoHinting or PreferVerticalHinting. We will use fontconfig hintstyle setting by default when no hintingPreference is set for the font. Task-number: QTBUG-12279 Reviewed-by: Eskil
* | Fix hebrew shaping of characters with multiple diacritics.Lars Knoll2011-03-141-2/+2
| | | | | | | | | | The old code would work for a maximum of one diacritic and insert dotted circles in valid syllables.
* | Fix combining marks shaping without GPOS feature in HarfBuzzJiang Jiang2011-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | For certain OpenType fonts like DejaVu Sans Mono, not all combining marks has GPOS feature applied, U+0062 U+0332 is one of the case. Only getting the advances for indivivual glyphs is not enough, we should also do heuristic positioning to put the combining mark in the right place. Task-number: QTBUG-15675 Reviewed-by: Lars Knoll
* | 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
* | Disable certain GPOS features by defaultJiang Jiang2010-12-201-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to OpenType Layout tag registry, these features should be turned off by default. Leaving them on will cause some text layout problems in common UI widgets -- they are usually designed for better positioning in print publishing or full featured text layout programs, not for general usage. There is no way to turn them on in HarfBuzz now, it should be addressed later. Features like 'valt' are intended for vertical writing mode are also turned off, since HarfBuzz doesn't support it properly yet. Task-number: QTBUG-15754 Reviewed-by: Lars Knoll
* | Move advances for control character in Indic syllable shapingJiang Jiang2010-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | When handling control characters (ZWJ, ZWNJ) in Indic syllables, we only moved glyphs and attributes of the item, advances should also be moved forward, otherwise we will use the advance of ZWJ/ ZWNJ for the part of syllable, which is normally zero, it results some positioning problems. Task-number: QTBUG-14204 Reviewed-by: Lars Knoll
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-1910-78/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/gui/kernel/qgesturemanager.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf Changes in qmake/generators/win32/msvc_objectmodel.cpp come from commit 4ba3dadcae97bfde6216c32cfa339f8f0e0253c7
| * Don't pack Harfbuzz structs, this causes unaligned access crashes.Andreas Kling2010-11-1210-78/+0
| | | | | | | | | | | | | | | | The memory-greediest structs have been reordered anyway, so the gain from forcibly packing them is mostly negligible. Task-number: QTBUG-13395 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * Fix Malayalam Rendering - 'Ra' is PreBaseJiang Jiang2010-11-021-1/+1
| | | | | | | | | | Task-number: QTBUG-1887 Reviewed-by: Lars Knoll
* | Add some tests for Indic shaping in HarfbuzzEskil Abrahamsen Blomfeldt2010-10-111-0/+29
| | | | | | | | | | | | | | | | These were added to confirm the behavior in merge request 2484. Their validity depends on the validity of the merge request. Task-number: QTBUG-13620, QTBUG-13616, QTBUG-13542
* | Fix several errors with shaping of Indic scriptsप्रविण सातपुते2010-10-111-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The opentype init feature was applied to some characters even when the character appeared inside a word. 2. Using the ZWJ to separate Ra and Halant Ya should connect the two latter characters and form a Yaphala 3. Some Oriya chars were not correctly marked as below-base form. Task-number: QTBUG-13620, QTBUG-13616, QTBUG-13542 Merge-request: 2484 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Remove unused local variable in myanmar shaper of harfbuzzJiang Jiang2010-09-071-4/+0
|/ | | | Reviewed-by: Lars Knoll
* Fix a typo in harfbuzz thai line breaking.Ritt Konstantin2010-07-211-1/+1
| | | | Reviewed-by: Lars Knoll
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-251-3/+5
| | | | | | | | 4b88f595ab62b7c5f703a286c4f5f13f8784a936 * Fix crash/regression in thai line word breaking when libthai is installed: Commit 4b88f595ab62b7c5f703a286c4f5f13f8784a936 upstream ensures the zero termination of the string passed to libthai.
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-241-1/+1
| | | | | | | a80fd59e3b3b18116803a14e6369345933994236 * Disable data structure packing with RVCT, as it appears that the compiler miscompiles the code.
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-221-4/+3
| | | | | | | f0dcb906fe56b5dc06aa305b6cfc821d5dd25a28 * Import f0dcb906fe56b5dc06aa305b6cfc821d5dd25a28 which fixes a crash with certain fonts.
* Clean up HB_Anchor's DeviceTables on failure when loading format 3Andreas Kling2010-06-221-1/+2
|
* Make sure ValueRecord's DeviceTables is cleaned up on failureAndreas Kling2010-06-221-2/+3
| | | | | Cleanup was a missing for the case where loading an X placement device table failed.
* Fix incorrect usage of _HB_OPEN_Free_Device() in CaretValue cleanupAndreas Kling2010-06-211-1/+1
|
* Fix null HB_Device** dereference on exit in Harfbuzz GPOS codeAndreas Kling2010-06-213-16/+20
| | | | Caught by QFontDialog autotest.
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-203-33/+8
| | | | | | | ab9a897b688e991a8405cf938dea9d6a2f1ac072 From Andreas Kling <andreas.kling@nokia.com>: * Unbreak _HB_OPEN_Get_Device() and Get_ValueRecord()
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-182-17/+31
| | | | | | | | | | | | | | | 5699175f55acbdfa4ac95ab6c727ebd4a201f3a2 Author: Andreas Kling <andreas.kling@nokia.com> Date: Fri Jun 18 16:10:31 2010 +0200 Make HB_AnchorFormat3's Device tables a pointer array Saves sizeof(pointer) * 1 when the font doesn't have these tables. Cuts resident memory consumption by 40kB when loading qt.nokia.com in QtWebKit. Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-185-70/+72
| | | | | | | 508b02a252b524d34f3ed970eef3bdb6350a2b77 * Andreas' compression for HB_ValueRecord * Re-enable packing for RVCT
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-161-1/+1
| | | | | | | 5e9b2a88688f6e360d7db00bc86a45bf2cf86e52 Includes Andreas' MSVC fix and fixes the RVCT build by temporarily disabling the structure packing.
* Buildfix for MSVC2008 (C90 violation)Andreas Kling2010-06-151-2/+4
|
* Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to ↵Simon Hausmann2010-06-1523-180/+912
| | | | | | | 1313dc84678c74f1c24f910f702d7ed27a417607 This includes Andreas' changes to reduce the memory usage by packing and re-odering data structures as well as Lars' greek shaper.
* Fix issues with thai line breakingLars Knoll2010-06-144-57/+51
| | | | | | | | | | | | | | | | | | | | | | | Merge latest harfbuzz: commit cce760d41f115fecd5b9b6b20b62883b10a9c204 Author: Lars Knoll <lars.knoll@nokia.com> Date: Mon Jun 14 14:14:59 2010 +0200 Fixes for thai linebreaking * Load libthai.so.0 since libthai.so is not there on all systems * Remove dependency on codecs. Unicode->TIS620 is so simple we can simply hardcode it in harbuzz-thai.c * Speed up detection of word boundaries * Falback when libthai is not found is now to not break instead of breaking after every character (in line with recommendations from unicode.org linebreaking algorithm) Reviewed-by: Simon Hausmann Adapt qharfbuzz.cpp to the changes in harfbuzz. Reviewed-by: Simon Hausmann
* merge commit c638ddc70f6a8196f2c8b11808ab01510233a0ee from harfbuzz:Lars Knoll2010-04-143-50/+193
| | | | | | | | | | | | | | | | | | | commit c638ddc70f6a8196f2c8b11808ab01510233a0ee Author: Lars Knoll <lars.knoll@nokia.com> Date: Wed Apr 14 17:01:49 2010 +0200 Fix a bug in malayalam shaping See http://bugreports.qt.nokia.com/browse/QTBUG-1887. We were not finding the base character correctly in the case where the syllable contained a ZWJ. In addition, the indic OT specs require us to also apply the 'loca', 'cjct' and 'calt' features. They seem to be mostly unused by todays fonts, but we should better apply them anyways. Task-number: QTBUG-1887 Reviewed-by: Eskil
* update harfbuzz to 2b78f0d78ad3075fd1657d1260b31219e1a5155Lars Knoll2009-12-212-3/+4
| | | | | | | | | Fix a regression in Hebrew text rendering that got introduced in Harfbuzz. Fix some uninitialized variables. Task-number: http://bugreports.qt.nokia.com/browse/QTBUG-6436 Reviewed-by: Simon Hausmann
* Fix uninitialized error variable if the stream doesn't existGordon Schumacher2009-11-261-1/+1
| | | | | Merge-request: 2174 Reviewed-by: Eskil