| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/render_text_harfbuzz.h" | 5 #include "ui/gfx/render_text_harfbuzz.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/i18n/bidi_line_iterator.h" | 10 #include "base/i18n/bidi_line_iterator.h" |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 GetFallbackFontFamilies(uniscribe_family); | 1314 GetFallbackFontFamilies(uniscribe_family); |
| 1315 fallback_families.insert(fallback_families.end(), | 1315 fallback_families.insert(fallback_families.end(), |
| 1316 uniscribe_fallbacks.begin(), uniscribe_fallbacks.end()); | 1316 uniscribe_fallbacks.begin(), uniscribe_fallbacks.end()); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 // Add Segoe UI and its associated linked fonts to the fallback font list to | 1319 // Add Segoe UI and its associated linked fonts to the fallback font list to |
| 1320 // ensure that the fallback list covers the basic cases. | 1320 // ensure that the fallback list covers the basic cases. |
| 1321 // http://crbug.com/467459. On some Windows configurations the default font | 1321 // http://crbug.com/467459. On some Windows configurations the default font |
| 1322 // could be a raster font like System, which would not give us a reasonable | 1322 // could be a raster font like System, which would not give us a reasonable |
| 1323 // fallback font list. | 1323 // fallback font list. |
| 1324 if (!LowerCaseEqualsASCII(primary_family, "segoe ui") && | 1324 if (!base::LowerCaseEqualsASCII(primary_family, "segoe ui") && |
| 1325 !LowerCaseEqualsASCII(uniscribe_family, "segoe ui")) { | 1325 !base::LowerCaseEqualsASCII(uniscribe_family, "segoe ui")) { |
| 1326 std::vector<std::string> default_fallback_families = | 1326 std::vector<std::string> default_fallback_families = |
| 1327 GetFallbackFontFamilies("Segoe UI"); | 1327 GetFallbackFontFamilies("Segoe UI"); |
| 1328 fallback_families.insert(fallback_families.end(), | 1328 fallback_families.insert(fallback_families.end(), |
| 1329 default_fallback_families.begin(), default_fallback_families.end()); | 1329 default_fallback_families.begin(), default_fallback_families.end()); |
| 1330 } | 1330 } |
| 1331 #endif | 1331 #endif |
| 1332 | 1332 |
| 1333 // Use a set to track the fallback fonts and avoid duplicate entries. | 1333 // Use a set to track the fallback fonts and avoid duplicate entries. |
| 1334 std::set<std::string, CaseInsensitiveCompare> fallback_fonts; | 1334 std::set<std::string, CaseInsensitiveCompare> fallback_fonts; |
| 1335 | 1335 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 DCHECK(!update_layout_run_list_); | 1479 DCHECK(!update_layout_run_list_); |
| 1480 DCHECK(!update_display_run_list_); | 1480 DCHECK(!update_display_run_list_); |
| 1481 return text_elided() ? display_run_list_.get() : &layout_run_list_; | 1481 return text_elided() ? display_run_list_.get() : &layout_run_list_; |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { | 1484 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { |
| 1485 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); | 1485 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 } // namespace gfx | 1488 } // namespace gfx |
| OLD | NEW |