summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 21:30:36 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 21:30:36 +0000
commit1aba79c9137e3b44ab37b1d48f1575704331ed7e (patch)
treee4710d28a7aef6720f884a62e3b4dd4cede51d73
parent39ee8f7a3096c37b18fa65047b88643b376f1cc3 (diff)
downloadchromium_src-1aba79c9137e3b44ab37b1d48f1575704331ed7e.zip
chromium_src-1aba79c9137e3b44ab37b1d48f1575704331ed7e.tar.gz
chromium_src-1aba79c9137e3b44ab37b1d48f1575704331ed7e.tar.bz2
Round font pixel sizes before VDMX lookup.
This helps us pass a few more layout tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5997 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--skia/ports/SkFontHost_FreeType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/skia/ports/SkFontHost_FreeType.cpp b/skia/ports/SkFontHost_FreeType.cpp
index 172e296..43b6295 100644
--- a/skia/ports/SkFontHost_FreeType.cpp
+++ b/skia/ports/SkFontHost_FreeType.cpp
@@ -837,7 +837,7 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx, SkP
my->fVDMXMetricsValid = false;
// Attempt to parse the VDMX table to get exact metrics
- unsigned pelsize = fScaleY >> 16;
+ unsigned pelsize = (fScaleY + 0x8000) >> 16;
int ymax, ymin;
if (SkFontHost_VDMX_Parse(&ymax, &ymin, face, pelsize)) {
my->fVDMXMetricsValid = true;