Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Unified Diff: third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.cpp

Issue 17624: Add m_isGlyphLookupMode to UniscribeHelper class and set it to true when fill... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.cpp
===================================================================
--- third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (revision 7936)
+++ third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (working copy)
@@ -86,6 +86,8 @@
, m_spaceWidth(0)
, m_wordSpacing(0)
, m_ascent(0)
+ , m_disableFontFallback(false)
+
{
m_logfont.lfFaceName[0] = 0;
}
@@ -508,7 +510,10 @@
HDC tempDC = NULL;
HGDIOBJ oldFont = 0;
HRESULT hr;
- bool lastFallbackTried = false;
+ // When used to fill up glyph pages for simple scripts in non-BMP,
+ // we don't want any font fallback in this class. The simple script
+ // font path can take care of font fallback.
+ bool lastFallbackTried = m_disableFontFallback;
bool result;
int generatedGlyphs = 0;
@@ -572,7 +577,8 @@
tempDC = NULL;
}
- if (NextWinFontData(&hfont, &scriptCache, &fontProperties, &ascent)) {
+ if (!m_disableFontFallback &&
+ NextWinFontData(&hfont, &scriptCache, &fontProperties, &ascent)) {
// The primary font does not support this run. Try next font.
// In case of web page rendering, they come from fonts specified in
// CSS stylesheets.
@@ -688,6 +694,13 @@
shaping))
continue;
+ // At the moment, the only time m_disableFontFallback is set is
+ // when we look up glyph indices for non-BMP code ranges. So,
+ // we can skip the glyph placement. When that becomes not the case
+ // any more, we have to add a new flag to control glyph placement.
+ if (m_disableFontFallback)
+ continue;
+
// Compute placements. Note that offsets is documented incorrectly
// and is actually an array.
« no previous file with comments | « third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698