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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 677803002: Do not commit: debug Windows RenderText test failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.cc
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
index 3ee533290ca729bb9871427740e29c597c6d1489..f06ff695d7f6d534300b52057de0dff9b20b03b6 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -1077,10 +1077,12 @@ bool RenderTextHarfBuzz::CompareFamily(
std::string* best_family,
gfx::FontRenderParams* best_render_params,
size_t* best_missing_glyphs) {
+ LOG(ERROR) << "XXX evaluating " << family;
if (!ShapeRunWithFont(run, family, render_params))
return false;
const size_t missing_glyphs = run->CountMissingGlyphs();
+ LOG(ERROR) << "XXX " << missing_glyphs << " missing glyph(s)";
if (missing_glyphs < *best_missing_glyphs) {
*best_family = family;
*best_render_params = render_params;
@@ -1097,10 +1099,11 @@ void RenderTextHarfBuzz::ShapeRun(internal::TextRunHarfBuzz* run) {
FontRenderParams best_render_params;
size_t best_missing_glyphs = std::numeric_limits<size_t>::max();
- if (CompareFamily(run, primary_font.GetFontName(),
- primary_font.GetFontRenderParams(),
- &best_family, &best_render_params, &best_missing_glyphs))
- return;
+ for (const Font& font : font_list().GetFonts()) {
+ if (CompareFamily(run, font.GetFontName(), font.GetFontRenderParams(),
+ &best_family, &best_render_params, &best_missing_glyphs))
+ return;
+ }
#if defined(OS_WIN)
Font uniscribe_font;
@@ -1127,6 +1130,7 @@ void RenderTextHarfBuzz::ShapeRun(internal::TextRunHarfBuzz* run) {
return;
}
+ LOG(ERROR) << "XXX best was " << best_family;
if (!best_family.empty() &&
(best_family == run->family ||
ShapeRunWithFont(run, best_family, best_render_params)))
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698