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))) |