| Index: ui/gfx/render_text_harfbuzz.cc
|
| diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc
|
| index f34dce7e3fb4d8182d76b59b6244dc06c7a036c8..7f6de1fa5d0808bd26070929e303f81297bd27d0 100644
|
| --- a/ui/gfx/render_text_harfbuzz.cc
|
| +++ b/ui/gfx/render_text_harfbuzz.cc
|
| @@ -1167,13 +1167,15 @@ void RenderTextHarfBuzz::ItemizeTextToRuns(
|
| DCHECK_LE(text.size(), baselines().max());
|
| for (const BreakList<bool>& style : styles())
|
| DCHECK_LE(text.size(), style.max());
|
| - 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);
|
| @@ -1242,7 +1244,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.
|
|
|