Index: ui/gfx/text_constants.h |
diff --git a/ui/gfx/text_constants.h b/ui/gfx/text_constants.h |
index 82f2a3b7061386b425c825480db256fe8c9ca446..cbd582119cf1403fb8d07024d27c6063083ae4d5 100644 |
--- a/ui/gfx/text_constants.h |
+++ b/ui/gfx/text_constants.h |
@@ -32,6 +32,16 @@ enum DirectionalityMode { |
}; |
// Text styles and adornments. |
+// Figure of font metrics: |
msw
2015/02/17 23:32:06
nit: vertically center "height", "ascent", and "ca
dschuyler
2015/02/18 01:37:27
Done.
|
+// +--------+--------+------------------------+-------------+ |
+// | | | internal leading | SUPERSCRIPT | |
+// | | ascent +------------+-----------| | |
+// | | | | SUPERIOR |-------------+ |
+// | | | |-----------| |
+// | height | | cap height | INFERIOR |-------------+ |
+// | |--------+------------+-----------| SUBSCRIPT | |
+// | | descent | | |
+// +--------+---------------------------------+-------------+ |
// TODO(msw): Merge with gfx::Font::FontStyle. |
enum TextStyle { |
BOLD = 0, |
@@ -39,6 +49,10 @@ enum TextStyle { |
STRIKE, |
DIAGONAL_STRIKE, |
UNDERLINE, |
+ SUPERSCRIPT, // e.g. a mathematical exponent would be superscript |
msw
2015/02/17 23:32:06
I don't think you'll want to merge these directly
dschuyler
2015/02/18 01:37:27
I'm a little less confident for the number of plac
msw
2015/02/18 17:07:23
What you have looks pretty good. That comment is s
|
+ SUPERIOR, // e.g. 8th, the "th" would be superior script |
+ INFERIOR, // e.g. 1/2, the "2" would be inferior ("1" is superior) |
+ SUBSCRIPT, // e.g. H2O, the "2" would be subscript |
NUM_TEXT_STYLES, |
}; |