Patch to Qt WebKit to fix rendering of soft hyphens in the viewer

This commit is contained in:
Kovid Goyal 2014-08-28 15:47:57 +05:30
parent cd44278fde
commit cc8b5e70c2

View File

@ -495,6 +495,21 @@ Download Qt sourcecode (.zip) from: http://download.qt-project.org/official_rele
qtxmlpatterns, qtdeclarative, qtquick1, qtwebsockets. Change the qtxmlpatterns, qtdeclarative, qtquick1, qtwebsockets. Change the
addModule line for qtwebkit to depend on qtbase instead of qtdeclarative. addModule line for qtwebkit to depend on qtbase instead of qtdeclarative.
* Patch to fix soft hyphen rendering in viewer (https://bugreports.qt-project.org/browse/QTBUG-40912):
--- qtwebkit/Source/WebCore/platform/graphics/WidthIterator.cpp
+++ qtwebkit/Source/WebCore/platform/graphics/WidthIterator.cpp
@@ -265,7 +265,7 @@ inline unsigned WidthIterator::advanceInternal(TextIterator& textIterator, Glyph
m_isAfterExpansion = false;
}
- if (shouldApplyFontTransforms() && glyphBuffer && Font::treatAsSpace(character))
+ if (shouldApplyFontTransforms() && glyphBuffer && (Font::treatAsSpace(character) || character == 0xad || character == 0x200b || character == 0x200c || character == 0x2060))
charactersTreatedAsSpace.append(make_pair(glyphBuffer->size(),
OriginalAdvancesForCharacterTreatedAsSpace(character == ' ', glyphBuffer->size() ? glyphBuffer->advanceAt(glyphBuffer->size() - 1).width() : 0, width)));
* Qt uses its own routine to locate and load "system libraries" including * Qt uses its own routine to locate and load "system libraries" including
the openssl libraries needed for "Get Books". This means that we have to the openssl libraries needed for "Get Books". This means that we have to
apply the following patch to have Qt load the openssl libraries bundled apply the following patch to have Qt load the openssl libraries bundled