diff options
author | Cary Clark <caryclark@skia.org> | 2018-11-08 16:00:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-11-09 00:48:17 +0000 |
commit | 4a23bbf823bb32687bb2fcec250328ea289abaf8 (patch) | |
tree | ccd6d8c0bd8c29a2285561fb237fe76e33846d16 /docs | |
parent | fe60bfb010874ee8882a74db405136c2baf4045e (diff) | |
download | skqp-4a23bbf823bb32687bb2fcec250328ea289abaf8.tar.gz |
fix doc paint hinting examples
Some references to the old hint enum
remained, so switch them over.
This fixes bookmaker nightly.
TBR=reed@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=169825
Bug: skia:
Change-Id: I2d13ae85e6e14e3445a03e361a50e91bb3bdedd2
Reviewed-on: https://skia-review.googlesource.com/c/169825
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/SkPaint_Reference.bmh | 18 | ||||
-rw-r--r-- | docs/undocumented.bmh | 23 |
2 files changed, 32 insertions, 9 deletions
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh index 29944b805d..cf6749af4e 100644 --- a/docs/SkPaint_Reference.bmh +++ b/docs/SkPaint_Reference.bmh @@ -60,7 +60,7 @@ Constructs Paint with default values. # Font_Embedded_Bitmaps # false ## # Automatic_Hinting # false ## # Full_Hinting_Spacing # false ## -# Hinting # kNormal_Hinting ## +# Hinting # SkFontHinting::kNormal ## # Image_Filter # nullptr ## # LCD_Text # false ## # Linear_Text # false ## @@ -350,7 +350,7 @@ the LCD output is reduced to a single grayscale channel. On Windows with DirectWrite, Hinting has no effect. -Hinting defaults to kNormal_Hinting. +Hinting defaults to SkFontHinting::kNormal. Set SkPaintDefaults_Hinting at compile time to change the default setting. #ToDo add an illustration? linux running GM:typefacerendering is best for this @@ -366,11 +366,11 @@ Set SkPaintDefaults_Hinting at compile time to change the default setting. #Example SkPaint paint; - SkDebugf("SkPaint::kNormal_Hinting %c= paint.getHinting()\n", - SkPaint::kNormal_Hinting == paint.getHinting() ? '=' : ':'); + SkDebugf("SkFontHinting::kNormal %c= paint.getHinting()\n", + SkFontHinting::kNormal == paint.getHinting() ? '=' : ':'); #StdOut - SkPaint::kNormal_Hinting == paint.getHinting() + SkFontHinting::kNormal == paint.getHinting() ## ## ## @@ -397,7 +397,7 @@ Set SkPaintDefaults_Hinting at compile time to change the default setting. #Example SkPaint paint1, paint2; - paint2.setHinting(SkPaint::kNormal_Hinting); + paint2.setHinting(SkFontHinting::kNormal); SkDebugf("paint1 %c= paint2\n", paint1 == paint2 ? '=' : ':'); #StdOut @@ -790,8 +790,8 @@ kLCDRenderText_Flag or kSubpixelText_Flag (or both) at compile time. #Line # selects text rendering as Glyph or Path ## Linear_Text selects whether text is rendered as a Glyph or as a Path. -If kLinearText_Flag is set, it has the same effect as setting Hinting to kNormal_Hinting. -If kLinearText_Flag is clear, it is the same as setting Hinting to kNo_Hinting. +If kLinearText_Flag is set, it has the same effect as setting Hinting to SkFontHinting::kNormal. +If kLinearText_Flag is clear, it is the same as setting Hinting to SkFontHinting::kNone. #Subtopic Linear_Text ## #Method bool isLinearText() const @@ -1048,7 +1048,7 @@ kEmbeddedBitmapText_Flag at compile time. #Line # always adjust glyph paths ## #Substitute auto-hinting -If Hinting is set to kNormal_Hinting or kFull_Hinting, Automatic_Hinting +If Hinting is set to SkFontHinting::kNormal or SkFontHinting::kFull, Automatic_Hinting instructs the Font_Manager to always hint Glyphs. Automatic_Hinting has no effect if Hinting is set to kNo_Hinting or kSlight_Hinting. diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh index b8f1140233..2c5d965bb0 100644 --- a/docs/undocumented.bmh +++ b/docs/undocumented.bmh @@ -347,12 +347,35 @@ FT_Load_Glyph ## #EnumClass SkFontHinting #Const kNone 0 +#Line # glyph outlines unchanged ## + Leaves glyph outlines unchanged from their native representation. + With FreeType, this is equivalent to the FT_LOAD_NO_HINTING + bit-field constant supplied to FT_Load_Glyph, which indicates that the vector + outline being loaded should not be fitted to the pixel grid but simply scaled + to 26.6 fractional pixels. ## #Const kSlight 1 +#Line # minimal modification to improve contrast ## + Modifies glyph outlines minimally to improve contrast. + With FreeType, this is equivalent in spirit to the + FT_LOAD_TARGET_LIGHT value supplied to FT_Load_Glyph. It chooses a + lighter hinting algorithm for non-monochrome modes. + Generated Glyphs may be fuzzy but better resemble their original shape. ## #Const kNormal 2 +#Line # glyph outlines modified to improve contrast ## + Modifies glyph outlines to improve contrast. This is the default. + With FreeType, this supplies FT_LOAD_TARGET_NORMAL to FT_Load_Glyph, + choosing the default hinting algorithm, which is optimized for standard + gray-level rendering. ## #Const kFull 3 +#Line # modifies glyph outlines for maximum contrast ## + Modifies glyph outlines for maximum contrast. With FreeType, this selects + FT_LOAD_TARGET_LCD or FT_LOAD_TARGET_LCD_V if kLCDRenderText_Flag is set. + FT_LOAD_TARGET_LCD is a variant of FT_LOAD_TARGET_NORMAL optimized for + horizontally decimated LCD displays; FT_LOAD_TARGET_LCD_V is a + variant of FT_LOAD_TARGET_NORMAL optimized for vertically decimated LCD displays. ## ## #Struct SkFontMetrics |