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

Unified Diff: ui/gfx/render_text_harfbuzz.h

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 years, 7 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 | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_harfbuzz.h
diff --git a/ui/gfx/render_text_harfbuzz.h b/ui/gfx/render_text_harfbuzz.h
index 10c53a4e7bc4b3bd61a441d08481fdf96ae5a87e..556a18b39f4b8b2929d577172a04b52d2acc9ab1 100644
--- a/ui/gfx/render_text_harfbuzz.h
+++ b/ui/gfx/render_text_harfbuzz.h
@@ -34,7 +34,7 @@ namespace internal {
struct GFX_EXPORT TextRunHarfBuzz {
// Construct the run with |template_font| since determining the details of a
// default-constructed gfx::Font is expensive, but it will always be replaced.
- explicit TextRunHarfBuzz(const gfx::Font& template_font);
+ explicit TextRunHarfBuzz(const Font& template_font);
~TextRunHarfBuzz();
// Returns the index of the first glyph that corresponds to the character at
@@ -81,7 +81,8 @@ struct GFX_EXPORT TextRunHarfBuzz {
int font_size;
int baseline_offset;
int baseline_type;
- int font_style;
+ bool italic;
+ Font::Weight weight;
bool strike;
bool diagonal_strike;
bool underline;
@@ -230,10 +231,10 @@ class GFX_EXPORT RenderTextHarfBuzz : public RenderText {
// has fewer than |best_missing_glyphs| missing glyphs.
bool CompareFamily(const base::string16& text,
const Font& font,
- const gfx::FontRenderParams& render_params,
+ const FontRenderParams& render_params,
internal::TextRunHarfBuzz* run,
Font* best_font,
- gfx::FontRenderParams* best_render_params,
+ FontRenderParams* best_render_params,
size_t* best_missing_glyphs);
// Shape the glyphs of all runs in |run_list| using |text|.
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gfx/render_text_harfbuzz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698