| Index: ui/gfx/render_text_harfbuzz.cc
|
| diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
|
| index 63b0e4e0cd79d009e83cb9989e680f987def1e06..8b503d1bfa7f8d8deca37486430f332965d23571 100644
|
| --- a/ui/gfx/render_text_harfbuzz.cc
|
| +++ b/ui/gfx/render_text_harfbuzz.cc
|
| @@ -1153,13 +1153,15 @@ void RenderTextHarfBuzz::ItemizeTextToRuns(
|
| // Use an empty color BreakList to avoid breaking runs at color boundaries.
|
| BreakList<SkColor> empty_colors;
|
| empty_colors.SetMax(text.length());
|
| - internal::StyleIterator style(empty_colors, baselines(), styles());
|
| + internal::StyleIterator style(font_sizes(), empty_colors, baselines(),
|
| + styles());
|
|
|
| for (size_t run_break = 0; run_break < text.length();) {
|
| internal::TextRunHarfBuzz* run = new internal::TextRunHarfBuzz;
|
| run->range.set_start(run_break);
|
| run->font_style = (style.style(BOLD) ? Font::BOLD : 0) |
|
| (style.style(ITALIC) ? Font::ITALIC : 0);
|
| + run->font_size = style.font_size();
|
| run->baseline_type = style.baseline();
|
| run->strike = style.style(STRIKE);
|
| run->diagonal_strike = style.style(DIAGONAL_STRIKE);
|
| @@ -1228,7 +1230,8 @@ void RenderTextHarfBuzz::ShapeRun(const base::string16& text,
|
| internal::TextRunHarfBuzz* run) {
|
| const Font& primary_font = font_list().GetPrimaryFont();
|
| const std::string primary_family = primary_font.GetFontName();
|
| - run->font_size = primary_font.GetFontSize();
|
| + if (run->font_size == 0)
|
| + run->font_size = primary_font.GetFontSize();
|
| run->baseline_offset = 0;
|
| if (run->baseline_type != NORMAL_BASELINE) {
|
| // Calculate a slightly smaller font. The ratio here is somewhat arbitrary.
|
|
|