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

Unified Diff: Source/platform/fonts/Font.cpp

Issue 1201143002: Removing broken ideograph font variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating TestExpectations Created 5 years, 6 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 | « LayoutTests/TestExpectations ('k') | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index 1ea158104f9d460c131f05ae3a9a700160a2b633..7d4b4366fc7a8b40db66603bf72306e1b35c09f6 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -423,16 +423,8 @@ GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa
return data;
bool isUpright = m_fontDescription.isVerticalUpright(c);
- if (isUpright && Character::isCJKIdeographOrSymbol(c)) {
- if (!data.fontData->hasVerticalGlyphs()) {
- // Use the broken ideograph font data. The broken ideograph font will use the horizontal width of glyphs
- // to make sure you get a square (even for broken glyphs like symbols used for punctuation).
- variant = BrokenIdeographVariant;
- break;
- }
- } else {
+ if (!isUpright || !Character::isCJKIdeographOrSymbol(c))
return glyphDataForNonCJKCharacterWithGlyphOrientation(c, isUpright, data, pageNumber);
- }
return data;
}
@@ -498,11 +490,8 @@ GlyphData Font::glyphDataForCharacter(UChar32& c, bool mirror, bool normalizeSpa
if (fontData) {
const SimpleFontData* fontDataToSubstitute = fontData->fontDataForCharacter(characterToRender);
RefPtr<SimpleFontData> characterFontData = FontCache::fontCache()->fallbackFontForCharacter(m_fontDescription, characterToRender, fontDataToSubstitute);
- if (characterFontData) {
- if (characterFontData->platformData().isVerticalAnyUpright() && !characterFontData->hasVerticalGlyphs() && Character::isCJKIdeographOrSymbol(c))
- variant = BrokenIdeographVariant;
- if (variant != NormalVariant)
- characterFontData = characterFontData->variantFontData(m_fontDescription, variant);
+ if (characterFontData && variant != NormalVariant) {
+ characterFontData = characterFontData->variantFontData(m_fontDescription, variant);
}
if (characterFontData) {
// Got the fallback glyph and font.
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698