Chromium Code Reviews| Index: ui/gfx/render_text_harfbuzz.cc |
| diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc |
| index 3c71cff58c57c1b5dabf7aacff9bf7cc9764be6e..a0a7b947a548087394a6b1b768ad5f89e275c152 100644 |
| --- a/ui/gfx/render_text_harfbuzz.cc |
| +++ b/ui/gfx/render_text_harfbuzz.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/i18n/break_iterator.h" |
| #include "base/i18n/char_iterator.h" |
| #include "base/profiler/scoped_tracker.h" |
| +#include "base/strings/string_util.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/trace_event/trace_event.h" |
| #include "third_party/harfbuzz-ng/src/hb.h" |
| @@ -1296,10 +1297,12 @@ void RenderTextHarfBuzz::ShapeRun(const base::string16& text, |
| // http://crbug.com/467459. On some Windows configurations the default font |
| // could be a raster font like System, which would not give us a reasonable |
| // fallback font list. |
| - std::vector<std::string> default_fallback_families = |
| - GetFallbackFontFamilies("Segoe UI"); |
| - fallback_families.insert(fallback_families.end(), |
| - default_fallback_families.begin(), default_fallback_families.end()); |
| + if (!LowerCaseEqualsASCII(primary_family, "segoe ui")) { |
|
msw
2015/03/24 17:38:52
nit: maybe check |uniscribe_family| too?
ananta
2015/03/24 20:10:12
Done.
|
| + std::vector<std::string> default_fallback_families = |
| + GetFallbackFontFamilies("Segoe UI"); |
| + fallback_families.insert(fallback_families.end(), |
| + default_fallback_families.begin(), default_fallback_families.end()); |
| + } |
| #endif |
| // Get rid of duplicate fonts in the fallback list. We use the std::unique |