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

Unified Diff: ui/gfx/render_text_harfbuzz.cc

Issue 678683003: Make RenderTextHarfBuzz examine full font list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable test on windows 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..642c76e2fdac1146b25cc741cbfb180c2320f810 100644
--- a/ui/gfx/render_text_harfbuzz.cc
+++ b/ui/gfx/render_text_harfbuzz.cc
@@ -1097,10 +1097,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;
« 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