Changeset 69117 in webkit
- Timestamp:
- Oct 5, 2010 9:58:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69102 r69117 1 2010-10-05 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] Complex text rendering does not render custom fonts 6 https://bugs.webkit.org/show_bug.cgi?id=41091 7 8 Added a layout test that verifies that custom fonts are rendered with 9 the correct font when hitting the complex text code path. 10 11 * platform/gtk/fonts/font-face-with-complex-text-expected.checksum: Added. 12 * platform/gtk/fonts/font-face-with-complex-text-expected.png: Added. 13 * platform/gtk/fonts/font-face-with-complex-text-expected.txt: Added. 14 * platform/gtk/fonts/font-face-with-complex-text.html: Added. 15 * platform/gtk/fonts/resources/Ahem.ttf: Copied from LayoutTests/fast/css/resources/Ahem.ttf. 16 1 17 2010-10-05 Kent Tamura <tkent@chromium.org> 2 18 -
trunk/WebCore/ChangeLog
r69114 r69117 1 2010-10-05 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Gustavo Noronha Silva. 4 5 [GTK] Complex text rendering does not render custom fonts 6 https://bugs.webkit.org/show_bug.cgi?id=41091 7 8 For fonts that do not have a FontConfig pattern (including custom 9 fonts), fall back to the simple text rendering path. This is a work- 10 -around for not supporting Pango rendering with non-FontConfig fonts. 11 12 Test: platform/gtk/fonts/font-face-with-complex-text.html 13 14 * platform/graphics/gtk/FontGtk.cpp: 15 (WebCore::Font::drawComplexText): Fall back to the simple path for custom fonts. 16 (WebCore::Font::floatWidthForComplexText): Ditto. 17 (WebCore::Font::offsetForPositionForComplexText): Ditto. 18 (WebCore::Font::selectionRectForComplexText): Ditto. 19 1 20 2010-10-05 Kwang Yul Seo <skyul@company100.net> 2 21 -
trunk/WebCore/platform/graphics/gtk/FontGtk.cpp
r67724 r69117 207 207 void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const 208 208 { 209 #if defined(USE_FREETYPE) 210 if (!primaryFont()->platformData().m_pattern) { 211 drawSimpleText(context, run, point, from, to); 212 return; 213 } 214 #endif 215 209 216 cairo_t* cr = context->platformContext(); 210 217 cairo_save(cr); … … 324 331 } 325 332 326 float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* /* fallbackFonts */, GlyphOverflow*) const 327 { 333 float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* overflow) const 334 { 335 #if defined(USE_FREETYPE) 336 if (!primaryFont()->platformData().m_pattern) 337 return floatWidthForSimpleText(run, 0, fallbackFonts, overflow); 338 #endif 339 328 340 if (run.length() == 0) 329 341 return 0.0f; … … 346 358 int Font::offsetForPositionForComplexText(const TextRun& run, float xFloat, bool includePartialGlyphs) const 347 359 { 360 #if defined(USE_FREETYPE) 361 if (!primaryFont()->platformData().m_pattern) 362 return offsetForPositionForSimpleText(run, xFloat, includePartialGlyphs); 363 #endif 348 364 // FIXME: This truncation is not a problem for HTML, but only affects SVG, which passes floating-point numbers 349 365 // to Font::offsetForPosition(). Bug http://webkit.org/b/40673 tracks fixing this problem. … … 370 386 FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint& point, int h, int from, int to) const 371 387 { 388 #if defined(USE_FREETYPE) 389 if (!primaryFont()->platformData().m_pattern) 390 return selectionRectForSimpleText(run, point, h, from, to); 391 #endif 392 372 393 PangoLayout* layout = getDefaultPangoLayout(run); 373 394 setPangoAttributes(this, run, layout);
Note: See TracChangeset
for help on using the changeset viewer.