aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-08-19 13:18:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-19 13:18:58 -0700
commit31c4772b780c6ed4d37049b02b403b6db1356d5c (patch)
tree60b3061815ecda0738f784e3e50d3e79c333f84d /include
parent94e51567dd691c3e1e8dfa6005a301d72cecf48e (diff)
Treat embedded bitmaps as a hinting method.
R=reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/483313002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkFont.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h
index 9bdecd6eb9..e4ebebb244 100644
--- a/include/core/SkFont.h
+++ b/include/core/SkFont.h
@@ -75,8 +75,8 @@ public:
enum Flags {
/**
* Use the system's automatic hinting mechanism to hint the typeface.
- * If both bytecode and auto hints are specified, attempt to use the bytecodes first.
- * If that fails (e.g. there are no codes), then attempt to autohint.
+ * This is a last resort hinting method applied only if other hinting methods do not apply.
+ * TODO: where to put auto-normal vs auto-light?
*/
kEnableAutoHints_Flag = 1 << 0,
@@ -88,6 +88,13 @@ public:
kEnableByteCodeHints_Flag = 1 << 1,
/**
+ * If the typeface contains explicit bitmaps for hinting, use them.
+ * If both bytecode and auto hints are also specified, attempt to use the bitmaps first;
+ * if that fails (e.g. there are no bitmaps), then attempt to bytecode or autohint.
+ */
+ kEmbeddedBitmaps_Flag = 1 << 2,
+
+ /**
* Use rounded metric values (e.g. advance).
* If either auto or bytecode hinting was used, apply those results to the metrics of the
* glyphs as well. If no hinting was applied, the metrics will just be rounded to the
@@ -96,10 +103,9 @@ public:
* This applies to calls that return metrics (e.g. measureText) and to drawing the glyphs
* (see SkCanvas drawText and drawPosText).
*/
- kUseNonlinearMetrics_Flag = 1 << 2,
+ kUseNonlinearMetrics_Flag = 1 << 3,
- kVertical_Flag = 1 << 3,
- kEmbeddedBitmaps_Flag = 1 << 4,
+ kVertical_Flag = 1 << 4,
kGenA8FromLCD_Flag = 1 << 5,
kEmbolden_Flag = 1 << 6,
kDevKern_Flag = 1 << 7, // ifdef ANDROID ?