Changeset 76644 in webkit
- Timestamp:
- Jan 25, 2011 3:07:06 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76640 r76644 1 2011-01-25 James Simonsen <simonjam@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 [Chromium] Support small caps in complex text on linux 6 https://bugs.webkit.org/show_bug.cgi?id=53051 7 8 * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.checksum: Added. 9 * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.png: Added. 10 * platform/chromium-linux/fast/text/atsui-multiple-renderers-expected.txt: Added. 11 * platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.checksum: Added. 12 * platform/chromium-linux/fast/text/atsui-small-caps-punctuation-size-expected.png: Added. 13 * platform/chromium/test_expectations.txt: Re-enable 2 tests on linux. 14 1 15 2011-01-25 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r76632 r76644 552 552 553 553 // Incrorect results, in incorrect international font metrics. 554 BUGCR20521 LINUXWIN : fast/text/atsui-multiple-renderers.html = FAIL554 BUGCR20521 WIN : fast/text/atsui-multiple-renderers.html = FAIL 555 555 BUGCR20521 LINUX WIN : fast/text/atsui-pointtooffset-calls-cg.html = FAIL TIMEOUT 556 556 BUGCR20521 LINUX WIN : fast/text/atsui-rtl-override-selection.html = FAIL … … 1112 1112 BUGCR10343 LINUX : fast/text/atsui-kerning-and-ligatures.html = FAIL 1113 1113 BUGCR10343 LINUX RELEASE : fast/text/atsui-partial-selection.html = IMAGE 1114 BUGCR10343 LINUX : fast/text/atsui-small-caps-punctuation-size.html = FAIL1115 1114 1116 1115 // Started timing out with agl's complext text change. Page is verrry slow. -
trunk/Source/WebCore/ChangeLog
r76638 r76644 1 2011-01-25 James Simonsen <simonjam@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 [Chromium] Support small caps in complex text on linux 6 https://bugs.webkit.org/show_bug.cgi?id=53051 7 8 * platform/graphics/chromium/ComplexTextControllerLinux.cpp: 9 (WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries. 10 (WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed. 11 * platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string. 12 1 13 2011-01-25 Steve Falkenburg <sfalken@apple.com> 2 14 -
trunk/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp
r76170 r76644 147 147 bool ComplexTextController::nextScriptRun() 148 148 { 149 // Ensure we're not pointing at the small caps buffer. 150 m_item.string = m_run.characters(); 151 149 152 if (!hb_utf16_script_run_next(&m_numCodePoints, &m_item.item, m_run.characters(), m_run.length(), &m_indexOfNextScriptRun)) 150 153 return false; … … 158 161 // found and take the largest subregion that stays within a single font. 159 162 m_currentFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false).fontData; 163 bool isFirstCharacterLowerCase = u_islower(m_item.string[m_item.item.pos]); 160 164 unsigned endOfRun; 161 165 for (endOfRun = 1; endOfRun < m_item.item.length; ++endOfRun) { 162 const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos + endOfRun], false).fontData; 166 UChar nextCharacter = m_item.string[m_item.item.pos + endOfRun]; 167 const SimpleFontData* nextFontData = m_font->glyphDataForCharacter(nextCharacter, false).fontData; 163 168 if (nextFontData != m_currentFontData) 169 break; 170 if (m_font->isSmallCaps() && isFirstCharacterLowerCase != u_islower(nextCharacter)) 164 171 break; 165 172 } … … 185 192 void ComplexTextController::setupFontForScriptRun() 186 193 { 187 const FontData* fontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false).fontData; 194 FontDataVariant fontDataVariant = AutoVariant; 195 // Determine if this script run needs to be converted to small caps. 196 // nextScriptRun() will always send us a run of the same case, so we only 197 // need to check the first character's case. 198 if (m_font->isSmallCaps() && u_islower(m_item.string[m_item.item.pos])) { 199 m_smallCapsString = String(m_run.data(m_item.item.pos), m_item.item.length); 200 m_smallCapsString.makeUpper(); 201 m_item.string = m_smallCapsString.characters(); 202 m_item.item.pos = 0; 203 fontDataVariant = SmallCapsVariant; 204 } 205 const FontData* fontData = m_font->glyphDataForCharacter(m_item.string[m_item.item.pos], false, fontDataVariant).fontData; 188 206 const FontPlatformData& platformData = fontData->fontDataForCharacter(' ')->platformData(); 189 207 m_item.face = platformData.harfbuzzFace(); -
trunk/Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h
r76137 r76644 156 156 // number of pixels that we are behind so far. 157 157 int m_letterSpacing; // pixels to be added after each glyph. 158 String m_smallCapsString; // substring of m_run converted to small caps. 158 159 }; 159 160
Note: See TracChangeset
for help on using the changeset viewer.