Fix some documentation for SkFont.

In particular, linear metrics now means 'linearly scalable metrics' as
expected. This also makes the documentation for the setter and getter
for subpixel positioning agree.

Change-Id: I08f5009f32516a0fdaecefc1d7dbe5f43c005a69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212406
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2019-05-07 11:09:58 -04:00 committed by Skia Commit-Bot
parent 06e14afaa7
commit 07dad1bc42

View File

@ -94,15 +94,15 @@ public:
*/
bool isEmbeddedBitmaps() const { return SkToBool(fFlags & kEmbeddedBitmaps_PrivFlag); }
/** Returns true if glyphs at different sub-pixel positions may differ on pixel edge coverage.
/** Returns true if glyphs may be drawn at sub-pixel offsets.
@return true if glyph positioned in pixel using transparency
@return true if glyphs may be drawn at sub-pixel offsets.
*/
bool isSubpixel() const { return SkToBool(fFlags & kSubpixel_PrivFlag); }
/** Returns true if text is converted to SkPath before drawing and measuring.
/** Returns true if font and glyph metrics are requested to be linearly scalable.
@return true glyph hints are never applied
@return true if font and glyph metrics are requested to be linearly scalable.
*/
bool isLinearMetrics() const { return SkToBool(fFlags & kLinearMetrics_PrivFlag); }
@ -134,10 +134,12 @@ public:
*/
void setSubpixel(bool subpixel);
/** Requests, but does not require, that glyphs are converted to SkPath
before drawing and measuring.
/** Requests, but does not require, linearly scalable font and glyph metrics.
@param linearMetrics setting for converting glyphs to paths
For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding.
Note that some bitmap formats may not be able to scale linearly and will ignore this flag.
@param linearMetrics setting for linearly scalable font and glyph metrics.
*/
void setLinearMetrics(bool linearMetrics);