<ahref='#Font_Size'>Font_Size</a> adjusts the overall <ahref='undocumented#Text'>text</a><ahref='undocumented#Size'>size</a> in <ahref='SkPoint_Reference#Point'>points</a>.
<ahref='#Font_Size'>Font_Size</a> can be set to any positive value or zero.
<ahref='#Font_Size'>Font_Size</a> defaults to 12.
<ahref='#Font_Size'>Font_Size</a>
<aname='Scale_X'></a>
<ahref='#Font_Scale_X'>Font_Scale_X</a> adjusts the <ahref='undocumented#Text'>text</a> horizontal scale.
<ahref='undocumented#Text'>Text</a> scaling approximates condensed and expanded type faces when the actual face
is not available.
<ahref='#Font_Scale_X'>Font_Scale_X</a> can be set to any value.
<ahref='#Font_Scale_X'>Font_Scale_X</a> defaults to 1.
<aname='Skew_X'></a>
<ahref='#Font_Skew_X'>Font_Skew_X</a> adjusts the <ahref='undocumented#Text'>text</a> horizontal slant.
<ahref='undocumented#Text'>Text</a> skewing approximates italic and oblique type faces when the actual face
is not available.
<ahref='#Font_Skew_X'>Font_Skew_X</a> can be set to any value.
<ahref='#Font_Skew_X'>Font_Skew_X</a> defaults to 0.
<aname='Embolden'></a>
<ahref='#Font_Embolden'>Font_Embolden</a> approximates the bold <ahref='SkFont_Reference#Font'>font</a> style accompanying a normal <ahref='SkFont_Reference#Font'>font</a> when a bold <ahref='SkFont_Reference#Font'>font</a> face
is not available. Skia does not provide <ahref='SkFont_Reference#Font'>font</a> substitution; it is up to the client to find the
bold <ahref='SkFont_Reference#Font'>font</a> face using the platform <ahref='#Font_Manager'>Font_Manager</a>.
Use <ahref='#Font_Skew_X'>Font_Skew_X</a> to approximate an italic <ahref='SkFont_Reference#Font'>font</a> style when the italic <ahref='SkFont_Reference#Font'>font</a> face
is not available.
A FreeType based port may define SK_USE_FREETYPE_EMBOLDEN at compile time to direct
the <ahref='SkFont_Reference#Font_Engine'>font engine</a> to create the bold <ahref='undocumented#Glyph'>Glyphs</a>. Otherwise, the extra bold is computed
by increasing the stroke width and setting the <ahref='SkPaint_Reference#SkPaint'>SkPaint</a>::<ahref='#SkPaint_Style'>Style</a> to
<ahref='SkPaint_Reference#SkPaint'>SkPaint</a>::<ahref='#SkPaint_kStrokeAndFill_Style'>kStrokeAndFill_Style</a> as needed.
<ahref='#Font_Embolden'>Font_Embolden</a> is disabled by default.
<aname='Hinting_Spacing'></a>
If Hinting is set to <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kFull'>kFull</a>, <ahref='#Font_Hinting_Spacing'>Hinting_Spacing</a> adjusts the character
spacing by the difference of the hinted and unhinted <ahref='#Left_Side_Bearing'>Left_Side_Bearing</a> and
<ahref='#Right_Side_Bearing'>Right_Side_Bearing</a>. <ahref='#Font_Hinting_Spacing'>Hinting_Spacing</a> only applies to platforms that use
FreeType as their <ahref='#Font_Engine'>Font_Engine</a>.
<ahref='#Font_Hinting_Spacing'>Hinting_Spacing</a> is not related to <ahref='undocumented#Text'>text</a> kerning, where the space between
a specific pair of characters is adjusted using <ahref='undocumented#Data'>data</a> in the <ahref='SkFont_Reference#Font'>font</a> kerning tables.
<aname='Linear'></a>
<ahref='#Font_Linear'>Font_Linear</a> selects whether <ahref='undocumented#Text'>text</a> is rendered as a <ahref='undocumented#Glyph'>Glyph</a> or as a <ahref='SkPath_Reference#Path'>Path</a>.
If <ahref='#Font_Linear'>Font_Linear</a> is set, it has the same effect as setting Hinting to <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNormal'>kNormal</a>.
If <ahref='#Font_Linear'>Font_Linear</a> is clear, it is the same as setting Hinting to <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNone'>kNone</a>.
<aname='Subpixel'></a>
<ahref='#Font_Subpixel'>Font_Subpixel</a> uses the <ahref='undocumented#Pixel'>pixel</a> transparency to represent a fractional offset.
As the opaqueness of the <ahref='SkColor_Reference#Color'>color</a> increases, the edge of the <ahref='undocumented#Glyph'>glyph</a> appears to move
towards the outside of the <ahref='undocumented#Pixel'>pixel</a>.
<aname='Anti_Alias'></a>
When set, <ahref='#Paint_Anti_Alias'>Anti_Alias</a> positions <ahref='undocumented#Glyph'>glyphs</a> within a <ahref='undocumented#Pixel'>pixel</a>, using <ahref='SkColor_Reference#Alpha'>alpha</a> and
possibly RGB striping. It can take advantage of the organization of RGB stripes
that create a <ahref='SkColor_Reference#Color'>color</a>, and relies on the small <ahref='undocumented#Size'>size</a> of the stripe and visual perception
to make the <ahref='SkColor_Reference#Color'>color</a> fringing imperceptible.
<ahref='#Paint_Anti_Alias'>Anti_Alias</a> can be enabled on devices that orient stripes horizontally
or vertically, and that order the <ahref='SkColor_Reference#Color'>color</a> components as RGB or BGR. Internally, the
<ahref='undocumented#Glyph'>glyph</a> cache may store multiple copies of the same <ahref='undocumented#Glyph'>glyph</a> with different <ahref='SkFont_Reference#Subpixel'>sub-pixel</a>
positions, requiring more memory.
<aname='Force_Hinting'></a>
If Hinting is set to <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNormal'>kNormal</a> or <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kFull'>kFull</a>, <ahref='#Font_Force_Hinting'>Force_Hinting</a>
instructs the <ahref='#Font_Manager'>Font_Manager</a> to always hint <ahref='undocumented#Glyph'>Glyphs</a>.
<ahref='#Font_Force_Hinting'>Force_Hinting</a> has no effect if Hinting is set to <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNone'>kNone</a> or
<ahref='#Font_Embedded_Bitmaps'>Embedded_Bitmaps</a> when set chooses an embedded <ahref='SkBitmap_Reference#Bitmap'>bitmap</a><ahref='undocumented#Glyph'>glyph</a> over an outline contained
in a <ahref='SkFont_Reference#Font'>font</a> if the platform supports this option.
FreeType selects the <ahref='SkBitmap_Reference#Bitmap'>bitmap</a><ahref='undocumented#Glyph'>glyph</a> if available when <ahref='#Font_Embedded_Bitmaps'>Embedded_Bitmaps</a> is set, and selects
the outline <ahref='undocumented#Glyph'>glyph</a> if <ahref='#Font_Embedded_Bitmaps'>Embedded_Bitmaps</a> is clear.
Windows may select the <ahref='SkBitmap_Reference#Bitmap'>bitmap</a><ahref='undocumented#Glyph'>glyph</a> but is not required to do so.
<ahref='#OS_X'>OS_X</a> and iOS do not support this option.
Constructs <ahref='SkFont_Reference#SkFont'>SkFont</a> with default values with <ahref='undocumented#SkTypeface'>SkTypeface</a> and <ahref='#SkFont_SkTypeface_SkScalar_size'>size</a> in <ahref='SkPoint_Reference#Point'>points</a>.
Constructs <ahref='SkFont_Reference#SkFont'>SkFont</a> with default values with <ahref='undocumented#SkTypeface'>SkTypeface</a> and <ahref='#SkFont_SkTypeface_SkScalar_SkScalar_SkScalar_size'>size</a> in <ahref='SkPoint_Reference#Point'>points</a>,
horizontal scale, and horizontal skew. Horizontal scale emulates condensed
and expanded fonts. Horizontal skew emulates oblique fonts.
Returns true if <ahref='SkFont_Reference#Font'>font</a> engine may return <ahref='undocumented#Glyph'>glyphs</a> from <ahref='SkFont_Reference#Font'>font</a><ahref='SkBitmap_Reference#Bitmap'>bitmaps</a> instead of from outlines.
### Return Value
true if <ahref='undocumented#Glyph'>glyphs</a> may be <ahref='SkFont_Reference#Font'>font</a><ahref='SkBitmap_Reference#Bitmap'>bitmaps</a>
Returns true if <ahref='undocumented#Glyph'>glyphs</a> at different <ahref='SkFont_Reference#Subpixel'>sub-pixel</a> positions may differ on <ahref='undocumented#Pixel'>pixel</a> edge coverage.
Sets whether to always hint <ahref='undocumented#Glyph'>glyphs</a>.
If <ahref='#SkFont_setForceAutoHinting_forceAutoHinting'>forceAutoHinting</a> is set, instructs the <ahref='undocumented#Font_Manager'>font manager</a> to always hint <ahref='undocumented#Glyph'>glyphs</a>.
Only affects platforms that use FreeType as the <ahref='undocumented#Font_Manager'>font manager</a>.
Increases stroke width when creating <ahref='undocumented#Glyph'>glyph</a><ahref='SkBitmap_Reference#Bitmap'>bitmaps</a> to approximate a bold <ahref='undocumented#Typeface'>typeface</a>.
Whether edge pixels draw opaque or with partial transparency.
### Return Value
one of: <ahref='#SkFont_Edging'>Edging</a>::<ahref='#SkFont_Edging_kAlias'>kAlias</a>, <ahref='#SkFont_Edging'>Edging</a>::<ahref='#SkFont_Edging_kAntiAlias'>kAntiAlias</a>, <ahref='#SkFont_Edging'>Edging</a>::<ahref='#SkFont_Edging_kSubpixelAntiAlias'>kSubpixelAntiAlias</a>
Returns level of <ahref='undocumented#Glyph'>glyph</a> outline adjustment.
### Return Value
one of: <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNone'>kNone</a>, <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kSlight'>kSlight</a>, <ahref='undocumented#SkFontHinting'>SkFontHinting</a>::<ahref='#SkFontHinting_kNormal'>kNormal</a>,
Returns a <ahref='SkFont_Reference#Font'>font</a> with the same attributes of this <ahref='SkFont_Reference#Font'>font</a>, but with the specified <ahref='#SkFont_makeWithSize_size'>size</a>.
Returns nullptr if <ahref='#SkFont_makeWithSize_size'>size</a> is less than zero, infinite, or NaN.
Sets <ahref='undocumented#SkTypeface'>SkTypeface</a> to <ahref='undocumented#Typeface'>typeface</a>, decreasing <ahref='undocumented#SkRefCnt'>SkRefCnt</a> of the previous <ahref='undocumented#SkTypeface'>SkTypeface</a>.
Pass nullptr to clear <ahref='undocumented#SkTypeface'>SkTypeface</a> and use the default <ahref='undocumented#Typeface'>typeface</a>. Increments
<ahref='#SkFont_setTypeface_tf'>tf</a><ahref='undocumented#SkRefCnt'>SkRefCnt</a> by one.
int <ahref='#SkFont_textToGlyphs'>textToGlyphs</a>(const void* <ahref='undocumented#Text'>text</a>, size_t byteLength, <ahref='undocumented#SkTextEncoding'>SkTextEncoding</a> encoding, <ahref='undocumented#SkGlyphID'>SkGlyphID</a><ahref='undocumented#Glyph'>glyphs</a>[],
int maxGlyphCount)const
</pre>
Converts <ahref='#SkFont_textToGlyphs_text'>text</a> into <ahref='undocumented#Glyph'>glyph</a> indices.
Returns the number of <ahref='undocumented#Glyph'>glyph</a> indices represented by <ahref='#SkFont_textToGlyphs_text'>text</a>.
<ahref='undocumented#SkTextEncoding'>SkTextEncoding</a> specifies how <ahref='#SkFont_textToGlyphs_text'>text</a> represents characters or <ahref='#SkFont_textToGlyphs_glyphs'>glyphs</a>.
<ahref='#SkFont_textToGlyphs_glyphs'>glyphs</a> may be nullptr, to compute the <ahref='undocumented#Glyph'>glyph</a> count.
Does not check <ahref='#SkFont_textToGlyphs_text'>text</a> for valid character codes or valid <ahref='undocumented#Glyph'>glyph</a> indices.
If <ahref='#SkFont_textToGlyphs_byteLength'>byteLength</a> equals zero, returns zero.
If <ahref='#SkFont_textToGlyphs_byteLength'>byteLength</a> includes a partial character, the partial character is ignored.
If <ahref='#SkFont_textToGlyphs_encoding'>encoding</a> is <ahref='undocumented#kUTF8_SkTextEncoding'>kUTF8_SkTextEncoding</a> and <ahref='#SkFont_textToGlyphs_text'>text</a> contains an invalid UTF-8 sequence,
zero is returned.
If <ahref='#SkFont_textToGlyphs_maxGlyphCount'>maxGlyphCount</a> is not sufficient to store all the <ahref='#SkFont_textToGlyphs_glyphs'>glyphs</a>, no <ahref='#SkFont_textToGlyphs_glyphs'>glyphs</a> are copied.
The total <ahref='undocumented#Glyph'>glyph</a> count is returned for subsequent buffer reallocation.
number of <ahref='#SkFont_textToGlyphs_glyphs'>glyphs</a> represented by <ahref='#SkFont_textToGlyphs_text'>text</a> of length <ahref='#SkFont_textToGlyphs_byteLength'>byteLength</a>
number of <ahref='undocumented#Glyph'>glyphs</a> represented by <ahref='#SkFont_countText_text'>text</a> of length <ahref='#SkFont_countText_byteLength'>byteLength</a>
Returns true if all <ahref='#SkFont_containsText_text'>text</a> corresponds to a non-zero <ahref='undocumented#Glyph'>glyph</a> index.
Returns false if any characters in <ahref='#SkFont_containsText_text'>text</a> are not supported in
<ahref='undocumented#SkTypeface'>SkTypeface</a>.
If <ahref='undocumented#SkTextEncoding'>SkTextEncoding</a> is <ahref='undocumented#kGlyphID_SkTextEncoding'>kGlyphID_SkTextEncoding</a>,
returns true if all <ahref='undocumented#Glyph'>glyph</a> indices in <ahref='#SkFont_containsText_text'>text</a> are non-zero;
does not check to see if <ahref='#SkFont_containsText_text'>text</a> contains valid <ahref='undocumented#Glyph'>glyph</a> indices for <ahref='undocumented#SkTypeface'>SkTypeface</a>.
Returns true if <ahref='#SkFont_containsText_byteLength'>byteLength</a> is zero.
Returns the bytes of <ahref='#SkFont_breakText_text'>text</a> that fit within <ahref='#SkFont_breakText_maxWidth'>maxWidth</a>.
The <ahref='#SkFont_breakText_text'>text</a> fragment fits if its advance width is less than or equal to <ahref='#SkFont_breakText_maxWidth'>maxWidth</a>.
Measures only while the advance is less than or equal to <ahref='#SkFont_breakText_maxWidth'>maxWidth</a>.
Returns the advance or the <ahref='#SkFont_breakText_text'>text</a> fragment in <ahref='#SkFont_breakText_measuredWidth'>measuredWidth</a> if it not nullptr.
Uses <ahref='#SkFont_breakText_encoding'>encoding</a> to decode <ahref='#SkFont_breakText_text'>text</a>, <ahref='undocumented#SkTypeface'>SkTypeface</a> to get the <ahref='undocumented#Font_Metrics'>font metrics</a>,
<td>advance limit; <ahref='#SkFont_breakText_text'>text</a> is measured while advance is less than <ahref='#SkFont_breakText_maxWidth'>maxWidth</a></td>
<div><fiddle-embedname="3cad18678254526be66ef162eecd1d23"><div><ahref='undocumented#Line'>Line</a> under "Breakfast" shows desired width, shorter than available characters.
<ahref='undocumented#Line'>Line</a> under "Bre" shows measured width after breaking <ahref='#SkFont_breakText_text'>text</a>.
<td>returns bounding box relative to (0, 0) if not nullptr</td>
</tr>
</table>
### Return Value
number of <ahref='undocumented#Glyph'>glyphs</a> represented by <ahref='#SkFont_measureText_text'>text</a> of length <ahref='#SkFont_measureText_byteLength'>byteLength</a>
Returns <ahref='#SkFont_getPath_path'>path</a> corresponding to <ahref='undocumented#Glyph'>glyph</a> outline.
If <ahref='undocumented#Glyph'>glyph</a> has an outline, copies outline to <ahref='#SkFont_getPath_path'>path</a> and returns true.
<ahref='#SkFont_getPath_path'>path</a> returned may be empty.
If <ahref='undocumented#Glyph'>glyph</a> is described by a <ahref='SkBitmap_Reference#Bitmap'>bitmap</a>, returns false and ignores <ahref='#SkFont_getPath_path'>path</a> parameter.
Returns <ahref='undocumented#SkFontMetrics'>SkFontMetrics</a> associated with <ahref='undocumented#SkTypeface'>SkTypeface</a>.
The return value is the recommended spacing between <ahref='undocumented#Line'>lines</a>: the sum of <ahref='#SkFont_getMetrics_metrics'>metrics</a>
descent, ascent, and leading.
If <ahref='#SkFont_getMetrics_metrics'>metrics</a> is not nullptr, <ahref='undocumented#SkFontMetrics'>SkFontMetrics</a> is copied to <ahref='#SkFont_getMetrics_metrics'>metrics</a>.
Results are scaled by <ahref='undocumented#Text'>text</a><ahref='undocumented#Size'>size</a> but does not take into account
dimensions required by <ahref='undocumented#Text'>text scale</a>, <ahref='undocumented#Text'>text skew</a>, fake bold,
style stroke, and <ahref='undocumented#SkPathEffect'>SkPathEffect</a>.