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

Unified Diff: include/core/SkFont.h

Issue 483313002: Treat embedded bitmaps as a hinting method. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFont.h
diff --git a/include/core/SkFont.h b/include/core/SkFont.h
index 9bdecd6eb94e900b9d4100b34c815d5d9a2e0d35..e4ebebb244aff0bf780f5f186f0f38a4ae8d9536 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 ?
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698