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

Side by Side Diff: ui/gfx/text_constants.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, 6 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 unified diff | Download patch
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GFX_TEXT_CONSTANTS_H_ 5 #ifndef UI_GFX_TEXT_CONSTANTS_H_
6 #define UI_GFX_TEXT_CONSTANTS_H_ 6 #define UI_GFX_TEXT_CONSTANTS_H_
7 7
8 namespace gfx { 8 namespace gfx {
9 9
10 // TODO(msw): Distinguish between logical character stops and glyph stops? 10 // TODO(msw): Distinguish between logical character stops and glyph stops?
(...skipping 26 matching lines...) Expand all
37 enum DirectionalityMode { 37 enum DirectionalityMode {
38 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction. 38 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction.
39 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction. 39 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction.
40 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale. 40 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale.
41 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale. 41 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale.
42 }; 42 };
43 43
44 // Text styles and adornments. 44 // Text styles and adornments.
45 // TODO(msw): Merge with gfx::Font::FontStyle. 45 // TODO(msw): Merge with gfx::Font::FontStyle.
46 enum TextStyle { 46 enum TextStyle {
47 BOLD = 0, 47 ITALIC = 0,
48 ITALIC,
49 STRIKE, 48 STRIKE,
50 DIAGONAL_STRIKE, 49 DIAGONAL_STRIKE,
51 UNDERLINE, 50 UNDERLINE,
52 NUM_TEXT_STYLES, 51 NUM_TEXT_STYLES,
53 }; 52 };
54 53
55 // Text baseline offset types. 54 // Text baseline offset types.
56 // Figure of font metrics: 55 // Figure of font metrics:
57 // +--------+--------+------------------------+-------------+ 56 // +--------+--------+------------------------+-------------+
58 // | | | internal leading | SUPERSCRIPT | 57 // | | | internal leading | SUPERSCRIPT |
(...skipping 19 matching lines...) Expand all
78 ELIDE_HEAD, // Add an ellipsis at the start of the string. 77 ELIDE_HEAD, // Add an ellipsis at the start of the string.
79 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string. 78 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string.
80 ELIDE_TAIL, // Add an ellipsis at the end of the string. 79 ELIDE_TAIL, // Add an ellipsis at the end of the string.
81 ELIDE_EMAIL, // Add ellipses to username and domain substrings. 80 ELIDE_EMAIL, // Add ellipses to username and domain substrings.
82 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment. 81 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment.
83 }; 82 };
84 83
85 } // namespace gfx 84 } // namespace gfx
86 85
87 #endif // UI_GFX_TEXT_CONSTANTS_H_ 86 #endif // UI_GFX_TEXT_CONSTANTS_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698