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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2392033002: Correcting text baseline for tiny fonts (Closed)
Patch Set: Rebaseline. Created 4 years, 2 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
Index: third_party/WebKit/Source/platform/fonts/FontCache.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
index 500a8848955c2cc658349e3bc0c815cc5ccddbb4..9756a474c7fd188adf940a0f594596669048f280 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -249,15 +249,18 @@ PassRefPtr<SimpleFontData> FontCache::getFontData(
if (FontPlatformData* platformData = getFontPlatformData(
fontDescription, FontFaceCreationParams(
adjustFamilyNameToAvoidUnsupportedFonts(family)),
- checkingAlternateName))
- return fontDataFromFontPlatformData(platformData, shouldRetain);
+ checkingAlternateName)) {
+ return fontDataFromFontPlatformData(
+ platformData, shouldRetain, fontDescription.subpixelAscentDescent());
+ }
return nullptr;
}
PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(
const FontPlatformData* platformData,
- ShouldRetain shouldRetain) {
+ ShouldRetain shouldRetain,
+ bool subpixelAscentDescent) {
if (!gFontDataCache)
gFontDataCache = new FontDataCache;
@@ -266,7 +269,7 @@ PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(
ASSERT(m_purgePreventCount);
#endif
- return gFontDataCache->get(platformData, shouldRetain);
+ return gFontDataCache->get(platformData, shouldRetain, subpixelAscentDescent);
}
bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription,

Powered by Google App Engine
This is Rietveld 408576698