Files
phy/ttf_parser/struct.Face.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

282 lines
86 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A font face."><title>Face in ttf_parser - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="ttf_parser" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../ttf_parser/index.html">ttf_<wbr>parser</a><span class="version">0.25.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Face</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.ascender" title="ascender">ascender</a></li><li><a href="#method.capital_height" title="capital_height">capital_height</a></li><li><a href="#method.color_palettes" title="color_palettes">color_palettes</a></li><li><a href="#method.descender" title="descender">descender</a></li><li><a href="#method.from_raw_tables" title="from_raw_tables">from_raw_tables</a></li><li><a href="#method.from_slice" title="from_slice">from_slice</a></li><li><a href="#method.global_bounding_box" title="global_bounding_box">global_bounding_box</a></li><li><a href="#method.glyph_bounding_box" title="glyph_bounding_box">glyph_bounding_box</a></li><li><a href="#method.glyph_hor_advance" title="glyph_hor_advance">glyph_hor_advance</a></li><li><a href="#method.glyph_hor_side_bearing" title="glyph_hor_side_bearing">glyph_hor_side_bearing</a></li><li><a href="#method.glyph_index" title="glyph_index">glyph_index</a></li><li><a href="#method.glyph_index_by_name" title="glyph_index_by_name">glyph_index_by_name</a></li><li><a href="#method.glyph_name" title="glyph_name">glyph_name</a></li><li><a href="#method.glyph_phantom_points" title="glyph_phantom_points">glyph_phantom_points</a></li><li><a href="#method.glyph_raster_image" title="glyph_raster_image">glyph_raster_image</a></li><li><a href="#method.glyph_svg_image" title="glyph_svg_image">glyph_svg_image</a></li><li><a href="#method.glyph_variation_index" title="glyph_variation_index">glyph_variation_index</a></li><li><a href="#method.glyph_ver_advance" title="glyph_ver_advance">glyph_ver_advance</a></li><li><a href="#method.glyph_ver_side_bearing" title="glyph_ver_side_bearing">glyph_ver_side_bearing</a></li><li><a href="#method.glyph_y_origin" title="glyph_y_origin">glyph_y_origin</a></li><li><a href="#method.has_non_default_variation_coordinates" title="has_non_default_variation_coordinates">has_non_default_variation_coordinates</a></li><li><a href="#method.height" title="height">height</a></li><li><a href="#method.is_bold" title="is_bold">is_bold</a></li><li><a href="#method.is_color_glyph" title="is_color_glyph">is_color_glyph</a></li><li><a href="#method.is_italic" title="is_italic">is_italic</a></li><li><a href="#method.is_monospaced" title="is_monospaced">is_monospaced</a></li><li><a href="#method.is_oblique" title="is_oblique">is_oblique</a></li><li><a href="#method.is_outline_embedding_allowed" title="is_outline_embedding_allowed">is_outline_embedding_allowed</a></li><li><a href="#method.is_regular" title="is_regular">is_regular</a></li><li><a href="#method.is_subsetting_allowed" title="is_subsetting_allowed">is_subsetting_allowed</a></li><li><a href="#method.is_variable" title="is_variable">is_variable</a></li><li><a href="#method.italic_angle" title="italic_angle">italic_angle</a></li><li><a href="#method.line_gap" title="line_gap">line_gap</a></li><li><a href="#method.names" title="names">names</a></li><li><a href="#method.number_of_glyphs" title="number_of_glyphs">number_of_glyphs</a></li><li><a href="#method.outline_glyph" title="outline_glyph">outline_glyph</a></li><li><a href="#method.paint_color_glyph" title="paint_color_glyph">paint_color_glyph</a></li><li><a href="#method.parse" title="parse">parse</a></li><li><a href="#method.permissions" title="permissions">permissions</a></li><li><a href="#method.raw_face" title="raw_face">raw_face</a></li><li><a href="#method.set_variation" title="set_variation">set_variation</a></li><li><a href="#method.strikeout_metrics" title="strikeout_metrics">strikeout_metrics</a></li><li><a href="#method.style" title="style">style</a></li><li><a href="#method.subscript_metrics" title="subscript_metrics">subscript_metrics</a></li><li><a href="#method.superscript_metrics" title="superscript_metrics">superscript_metrics</a></li><li><a href="#method.table_data" title="table_data">table_data</a></li><li><a href="#method.tables" title="tables">tables</a></li><li><a href="#method.typographic_ascender" title="typographic_ascender">typographic_ascender</a></li><li><a href="#method.typographic_descender" title="typographic_descender">typographic_descender</a></li><li><a href="#method.typographic_line_gap" title="typographic_line_gap">typographic_line_gap</a></li><li><a href="#method.underline_metrics" title="underline_metrics">underline_metrics</a></li><li><a href="#method.unicode_ranges" title="unicode_ranges">unicode_ranges</a></li><li><a href="#method.units_per_em" title="units_per_em">units_per_em</a></li><li><a href="#method.variation_axes" title="variation_axes">variation_axes</a></li><li><a href="#method.variation_coordinates" title="variation_coordinates">variation_coordinates</a></li><li><a href="#method.vertical_ascender" title="vertical_ascender">vertical_ascender</a></li><li><a href="#method.vertical_descender" title="vertical_descender">vertical_descender</a></li><li><a href="#method.vertical_height" title="vertical_height">vertical_height</a></li><li><a href="#method.vertical_line_gap" title="vertical_line_gap">vertical_line_gap</a></li><li><a href="#method.weight" title="weight">weight</a></li><li><a href="#method.width" title="width">width</a></li><li><a href="#method.x_height" title="x_height">x_height</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Face%3C'a%3E" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-Face%3C'_%3E" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Face%3C'a%3E" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Face%3C'a%3E" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Face%3C'a%3E" title="Send">Send</a></li><li><a href="#impl-Sync-for-Face%3C'a%3E" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Face%3C'a%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Face%3C'a%3E" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate ttf_<wbr>parser</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">ttf_parser</a></span><h1>Struct <span class="struct">Face</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/ttf_parser/lib.rs.html#1071-1076">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Face&lt;'a&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A font face.</p>
<p>Provides a high-level API for working with TrueType fonts.
If youre not familiar with how TrueType works internally, you should use this type.
If you do know and want a bit more low-level access - checkout <a href="struct.FaceTables.html" title="struct ttf_parser::FaceTables"><code>FaceTables</code></a>.</p>
<p>Note that <code>Face</code> doesnt own the font data and doesnt allocate anything in heap.
Therefore you cannot “store” it. The idea is that you should parse the <code>Face</code>
when needed, get required data and forget about it.
Thats why the initial parsing is highly optimized and should not become a bottleneck.</p>
<p>If you still want to store <code>Face</code> - checkout
<a href="https://crates.io/crates/owned_ttf_parser">owned_ttf_parser</a>. Requires <code>unsafe</code>.</p>
<p>While <code>Face</code> is technically copyable, we disallow it because its almost 2KB big.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Face%3C'a%3E" class="impl"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1078-2396">Source</a><a href="#impl-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from_slice" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1092-1094">Source</a><h4 class="code-header">pub fn <a href="#method.from_slice" class="fn">from_slice</a>(data: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>], index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.FaceParsingError.html" title="enum ttf_parser::FaceParsingError">FaceParsingError</a>&gt;</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.16.0: use <code>parse</code> instead</span></div></span></summary><div class="docblock"><p>Creates a new <a href="struct.Face.html" title="struct ttf_parser::Face"><code>Face</code></a> from a raw data.</p>
<p><code>index</code> indicates the specific font face in a font collection.
Use <a href="fn.fonts_in_collection.html" title="fn ttf_parser::fonts_in_collection"><code>fonts_in_collection</code></a> to get the total number of font faces.
Set to 0 if unsure.</p>
<p>This method will do some parsing and sanitization,
but in general can be considered free. No significant performance overhead.</p>
<p>Required tables: <code>head</code>, <code>hhea</code> and <code>maxp</code>.</p>
<p>If an optional table has invalid data it will be skipped.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.parse" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1108-1128">Source</a><h4 class="code-header">pub fn <a href="#method.parse" class="fn">parse</a>(data: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>], index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.FaceParsingError.html" title="enum ttf_parser::FaceParsingError">FaceParsingError</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <a href="struct.Face.html" title="struct ttf_parser::Face"><code>Face</code></a> from a raw data.</p>
<p><code>index</code> indicates the specific font face in a font collection.
Use <a href="fn.fonts_in_collection.html" title="fn ttf_parser::fonts_in_collection"><code>fonts_in_collection</code></a> to get the total number of font faces.
Set to 0 if unsure.</p>
<p>This method will do some parsing and sanitization,
but in general can be considered free. No significant performance overhead.</p>
<p>Required tables: <code>head</code>, <code>hhea</code> and <code>maxp</code>.</p>
<p>If an optional table has invalid data it will be skipped.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.from_raw_tables" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1208-1228">Source</a><h4 class="code-header">pub fn <a href="#method.from_raw_tables" class="fn">from_raw_tables</a>(
raw_tables: <a class="struct" href="struct.RawFaceTables.html" title="struct ttf_parser::RawFaceTables">RawFaceTables</a>&lt;'a&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.FaceParsingError.html" title="enum ttf_parser::FaceParsingError">FaceParsingError</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new <a href="struct.Face.html" title="struct ttf_parser::Face"><code>Face</code></a> from provided <a href="struct.RawFaceTables.html" title="struct ttf_parser::RawFaceTables"><code>RawFaceTables</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tables" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1367-1369">Source</a><h4 class="code-header">pub fn <a href="#method.tables" class="fn">tables</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.FaceTables.html" title="struct ttf_parser::FaceTables">FaceTables</a>&lt;'a&gt;</h4></section></summary><div class="docblock"><p>Returns low-level face tables.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.raw_face" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1377-1379">Source</a><h4 class="code-header">pub fn <a href="#method.raw_face" class="fn">raw_face</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.RawFace.html" title="struct ttf_parser::RawFace">RawFace</a>&lt;'a&gt;</h4></section></summary><div class="docblock"><p>Returns the <code>RawFace</code> used to create this <code>Face</code>.</p>
<p>Useful if you want to parse the data manually.</p>
<p>Available only for faces created using <a href="struct.Face.html#method.parse"><code>Face::parse()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.table_data" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1388-1390">Source</a><h4 class="code-header">pub fn <a href="#method.table_data" class="fn">table_data</a>(&amp;self, tag: <a class="struct" href="struct.Tag.html" title="struct ttf_parser::Tag">Tag</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;'a [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>]&gt;</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.16.0: use <code>self.raw_face().table()</code> instead</span></div></span></summary><div class="docblock"><p>Returns the raw data of a selected table.</p>
<p>Useful if you want to parse the data manually.</p>
<p>Available only for faces created using <a href="struct.Face.html#method.parse"><code>Face::parse()</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.names" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1396-1398">Source</a><h4 class="code-header">pub fn <a href="#method.names" class="fn">names</a>(&amp;self) -&gt; <a class="struct" href="name/struct.Names.html" title="struct ttf_parser::name::Names">Names</a>&lt;'a&gt;</h4></section></summary><div class="docblock"><p>Returns a list of names.</p>
<p>Contains face name and other strings.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_regular" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1404-1406">Source</a><h4 class="code-header">pub fn <a href="#method.is_regular" class="fn">is_regular</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is marked as <em>Regular</em>.</p>
<p>Returns <code>false</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_italic" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1410-1413">Source</a><h4 class="code-header">pub fn <a href="#method.is_italic" class="fn">is_italic</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is marked as <em>Italic</em>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_bold" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1419-1421">Source</a><h4 class="code-header">pub fn <a href="#method.is_bold" class="fn">is_bold</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is marked as <em>Bold</em>.</p>
<p>Returns <code>false</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_oblique" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1427-1429">Source</a><h4 class="code-header">pub fn <a href="#method.is_oblique" class="fn">is_oblique</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is marked as <em>Oblique</em>.</p>
<p>Returns <code>false</code> when OS/2 table is not present or when its version is &lt; 4.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.style" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1433-1435">Source</a><h4 class="code-header">pub fn <a href="#method.style" class="fn">style</a>(&amp;self) -&gt; <a class="enum" href="os2/enum.Style.html" title="enum ttf_parser::os2::Style">Style</a></h4></section></summary><div class="docblock"><p>Returns face style.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_monospaced" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1441-1446">Source</a><h4 class="code-header">pub fn <a href="#method.is_monospaced" class="fn">is_monospaced</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is marked as <em>Monospaced</em>.</p>
<p>Returns <code>false</code> when <code>post</code> table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_variable" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1452-1463">Source</a><h4 class="code-header">pub fn <a href="#method.is_variable" class="fn">is_variable</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face is variable.</p>
<p>Simply checks the presence of a <code>fvar</code> table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.weight" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1469-1471">Source</a><h4 class="code-header">pub fn <a href="#method.weight" class="fn">weight</a>(&amp;self) -&gt; <a class="enum" href="os2/enum.Weight.html" title="enum ttf_parser::os2::Weight">Weight</a></h4></section></summary><div class="docblock"><p>Returns faces weight.</p>
<p>Returns <code>Weight::Normal</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.width" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1477-1479">Source</a><h4 class="code-header">pub fn <a href="#method.width" class="fn">width</a>(&amp;self) -&gt; <a class="enum" href="os2/enum.Width.html" title="enum ttf_parser::os2::Width">Width</a></h4></section></summary><div class="docblock"><p>Returns faces width.</p>
<p>Returns <code>Width::Normal</code> when OS/2 table is not present or when value is invalid.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.italic_angle" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1485-1490">Source</a><h4 class="code-header">pub fn <a href="#method.italic_angle" class="fn">italic_angle</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section></summary><div class="docblock"><p>Returns faces italic angle.</p>
<p>Returns <code>0.0</code> when <code>post</code> table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.ascender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1499-1521">Source</a><h4 class="code-header">pub fn <a href="#method.ascender" class="fn">ascender</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Returns a horizontal face ascender.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.descender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1527-1549">Source</a><h4 class="code-header">pub fn <a href="#method.descender" class="fn">descender</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Returns a horizontal face descender.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.height" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1555-1557">Source</a><h4 class="code-header">pub fn <a href="#method.height" class="fn">height</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Returns faces height.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.line_gap" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1563-1585">Source</a><h4 class="code-header">pub fn <a href="#method.line_gap" class="fn">line_gap</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a></h4></section></summary><div class="docblock"><p>Returns a horizontal face line gap.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.typographic_ascender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1596-1601">Source</a><h4 class="code-header">pub fn <a href="#method.typographic_ascender" class="fn">typographic_ascender</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a horizontal typographic face ascender.</p>
<p>Prefer <code>Face::ascender</code> unless you explicitly want this. This is a more
low-level alternative.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.typographic_descender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1612-1617">Source</a><h4 class="code-header">pub fn <a href="#method.typographic_descender" class="fn">typographic_descender</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a horizontal typographic face descender.</p>
<p>Prefer <code>Face::descender</code> unless you explicitly want this. This is a more
low-level alternative.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.typographic_line_gap" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1628-1633">Source</a><h4 class="code-header">pub fn <a href="#method.typographic_line_gap" class="fn">typographic_line_gap</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a horizontal typographic face line gap.</p>
<p>Prefer <code>Face::line_gap</code> unless you explicitly want this. This is a more
low-level alternative.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.vertical_ascender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1639-1644">Source</a><h4 class="code-header">pub fn <a href="#method.vertical_ascender" class="fn">vertical_ascender</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vertical face ascender.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.vertical_descender" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1650-1655">Source</a><h4 class="code-header">pub fn <a href="#method.vertical_descender" class="fn">vertical_descender</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vertical face descender.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.vertical_height" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1661-1663">Source</a><h4 class="code-header">pub fn <a href="#method.vertical_height" class="fn">vertical_height</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vertical face height.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.vertical_line_gap" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1669-1674">Source</a><h4 class="code-header">pub fn <a href="#method.vertical_line_gap" class="fn">vertical_line_gap</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a vertical face line gap.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.units_per_em" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1680-1682">Source</a><h4 class="code-header">pub fn <a href="#method.units_per_em" class="fn">units_per_em</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Returns faces units per EM.</p>
<p>Guarantee to be in a 16..=16384 range.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.x_height" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1690-1695">Source</a><h4 class="code-header">pub fn <a href="#method.x_height" class="fn">x_height</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces x height.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present or when its version is &lt; 2.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.capital_height" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1703-1708">Source</a><h4 class="code-header">pub fn <a href="#method.capital_height" class="fn">capital_height</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces capital height.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present or when its version is &lt; 2.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.underline_metrics" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1716-1725">Source</a><h4 class="code-header">pub fn <a href="#method.underline_metrics" class="fn">underline_metrics</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.LineMetrics.html" title="struct ttf_parser::LineMetrics">LineMetrics</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces underline metrics.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when <code>post</code> table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.strikeout_metrics" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1733-1742">Source</a><h4 class="code-header">pub fn <a href="#method.strikeout_metrics" class="fn">strikeout_metrics</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.LineMetrics.html" title="struct ttf_parser::LineMetrics">LineMetrics</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces strikeout metrics.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.subscript_metrics" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1750-1761">Source</a><h4 class="code-header">pub fn <a href="#method.subscript_metrics" class="fn">subscript_metrics</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="os2/struct.ScriptMetrics.html" title="struct ttf_parser::os2::ScriptMetrics">ScriptMetrics</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces subscript metrics.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.superscript_metrics" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1769-1780">Source</a><h4 class="code-header">pub fn <a href="#method.superscript_metrics" class="fn">superscript_metrics</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="os2/struct.ScriptMetrics.html" title="struct ttf_parser::os2::ScriptMetrics">ScriptMetrics</a>&gt;</h4></section></summary><div class="docblock"><p>Returns faces superscript metrics.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when OS/2 table is not present.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.permissions" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1786-1788">Source</a><h4 class="code-header">pub fn <a href="#method.permissions" class="fn">permissions</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="os2/enum.Permissions.html" title="enum ttf_parser::os2::Permissions">Permissions</a>&gt;</h4></section></summary><div class="docblock"><p>Returns face permissions.</p>
<p>Returns <code>None</code> in case of a malformed value.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_subsetting_allowed" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1792-1797">Source</a><h4 class="code-header">pub fn <a href="#method.is_subsetting_allowed" class="fn">is_subsetting_allowed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if the face allows embedding a subset, further restricted by <a href="struct.Face.html#method.permissions" title="method ttf_parser::Face::permissions"><code>Self::permissions</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_outline_embedding_allowed" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1805-1810">Source</a><h4 class="code-header">pub fn <a href="#method.is_outline_embedding_allowed" class="fn">is_outline_embedding_allowed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks if the face allows outline data to be embedded.</p>
<p>If false, only bitmaps may be embedded in accordance with <a href="struct.Face.html#method.permissions" title="method ttf_parser::Face::permissions"><code>Self::permissions</code></a>.</p>
<p>If the font contains no bitmaps and this flag is not set, it implies no embedding is allowed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.unicode_ranges" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1814-1819">Source</a><h4 class="code-header">pub fn <a href="#method.unicode_ranges" class="fn">unicode_ranges</a>(&amp;self) -&gt; <a class="struct" href="os2/struct.UnicodeRanges.html" title="struct ttf_parser::os2::UnicodeRanges">UnicodeRanges</a></h4></section></summary><div class="docblock"><p>Returns <a href="https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ur">Unicode Ranges</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.number_of_glyphs" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1827-1829">Source</a><h4 class="code-header">pub fn <a href="#method.number_of_glyphs" class="fn">number_of_glyphs</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Returns a total number of glyphs in the face.</p>
<p>Never zero.</p>
<p>The value was already parsed, so this function doesnt involve any parsing.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_index" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1839-1851">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_index" class="fn">glyph_index</a>(&amp;self, code_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.char.html">char</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>&gt;</h4></section></summary><div class="docblock"><p>Resolves a Glyph ID for a code point.</p>
<p>Returns <code>None</code> instead of <code>0</code> when glyph is not found.</p>
<p>All subtable formats except Mixed Coverage (8) are supported.</p>
<p>If you need a more low-level control, prefer <code>Face::tables().cmap</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_index_by_name" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1860-1879">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_index_by_name" class="fn">glyph_index_by_name</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>&gt;</h4></section></summary><div class="docblock"><p>Resolves a Glyph ID for a glyph name.</p>
<p>Uses the <code>post</code> and <code>CFF</code> tables as sources.</p>
<p>Returns <code>None</code> when no name is associated with a <code>glyph</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_variation_index" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1889-1900">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_variation_index" class="fn">glyph_variation_index</a>(
&amp;self,
code_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.char.html">char</a>,
variation: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.char.html">char</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>&gt;</h4></section></summary><div class="docblock"><p>Resolves a variation of a Glyph ID from two code points.</p>
<p>Implemented according to
<a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cmap#format-14-unicode-variation-sequences">Unicode Variation Sequences</a>.</p>
<p>Returns <code>None</code> instead of <code>0</code> when glyph is not found.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_hor_advance" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1906-1931">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_hor_advance" class="fn">glyph_hor_advance</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs horizontal advance.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_ver_advance" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1937-1962">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_ver_advance" class="fn">glyph_ver_advance</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs vertical advance.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_hor_side_bearing" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1968-1990">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_hor_side_bearing" class="fn">glyph_hor_side_bearing</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs horizontal side bearing.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_ver_side_bearing" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1996-2018">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_ver_side_bearing" class="fn">glyph_ver_side_bearing</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs vertical side bearing.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_y_origin" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2024-2046">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_y_origin" class="fn">glyph_y_origin</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i16.html">i16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs vertical origin according to
<a href="https://docs.microsoft.com/en-us/typography/opentype/spec/vorg">Vertical Origin Table</a>.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_name" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2055-2070">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_name" class="fn">glyph_name</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>&gt;</h4></section></summary><div class="docblock"><p>Returns glyphs name.</p>
<p>Uses the <code>post</code> and <code>CFF</code> tables as sources.</p>
<p>Returns <code>None</code> when no name is associated with a <code>glyph</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.outline_glyph" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2125-2153">Source</a><h4 class="code-header">pub fn <a href="#method.outline_glyph" class="fn">outline_glyph</a>(
&amp;self,
glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>,
builder: &amp;mut dyn <a class="trait" href="trait.OutlineBuilder.html" title="trait ttf_parser::OutlineBuilder">OutlineBuilder</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Rect.html" title="struct ttf_parser::Rect">Rect</a>&gt;</h4></section></summary><div class="docblock"><p>Outlines a glyph and returns its tight bounding box.</p>
<p><strong>Warning</strong>: since <code>ttf-parser</code> is a pull parser,
<code>OutlineBuilder</code> will emit segments even when outline is partially malformed.
You must check <code>outline_glyph()</code> result before using
<code>OutlineBuilder</code>s output.</p>
<p><code>gvar</code>, <code>glyf</code>, <code>CFF</code> and <code>CFF2</code> tables are supported.
And they will be accesses in this specific order.</p>
<p>This method is affected by variation axes.</p>
<p>Returns <code>None</code> when glyph has no outline or on error.</p>
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::fmt::Write;
<span class="kw">use </span>ttf_parser;
<span class="kw">struct </span>Builder(String);
<span class="kw">impl </span>ttf_parser::OutlineBuilder <span class="kw">for </span>Builder {
<span class="kw">fn </span>move_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, x: f32, y: f32) {
<span class="macro">write!</span>(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"M {} {} "</span>, x, y).unwrap();
}
<span class="kw">fn </span>line_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, x: f32, y: f32) {
<span class="macro">write!</span>(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"L {} {} "</span>, x, y).unwrap();
}
<span class="kw">fn </span>quad_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, x1: f32, y1: f32, x: f32, y: f32) {
<span class="macro">write!</span>(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"Q {} {} {} {} "</span>, x1, y1, x, y).unwrap();
}
<span class="kw">fn </span>curve_to(<span class="kw-2">&amp;mut </span><span class="self">self</span>, x1: f32, y1: f32, x2: f32, y2: f32, x: f32, y: f32) {
<span class="macro">write!</span>(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"C {} {} {} {} {} {} "</span>, x1, y1, x2, y2, x, y).unwrap();
}
<span class="kw">fn </span>close(<span class="kw-2">&amp;mut </span><span class="self">self</span>) {
<span class="macro">write!</span>(<span class="kw-2">&amp;mut </span><span class="self">self</span>.<span class="number">0</span>, <span class="string">"Z "</span>).unwrap();
}
}
<span class="kw">let </span>data = std::fs::read(<span class="string">"tests/fonts/demo.ttf"</span>).unwrap();
<span class="kw">let </span>face = ttf_parser::Face::parse(<span class="kw-2">&amp;</span>data, <span class="number">0</span>).unwrap();
<span class="kw">let </span><span class="kw-2">mut </span>builder = Builder(String::new());
<span class="kw">let </span>bbox = face.outline_glyph(ttf_parser::GlyphId(<span class="number">1</span>), <span class="kw-2">&amp;mut </span>builder).unwrap();
<span class="macro">assert_eq!</span>(builder.<span class="number">0</span>, <span class="string">"M 173 267 L 369 267 L 270 587 L 173 267 Z M 6 0 L 224 656 \
L 320 656 L 541 0 L 452 0 L 390 200 L 151 200 L 85 0 L 6 0 Z "</span>);
<span class="macro">assert_eq!</span>(bbox, ttf_parser::Rect { x_min: <span class="number">6</span>, y_min: <span class="number">0</span>, x_max: <span class="number">541</span>, y_max: <span class="number">656 </span>});</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_bounding_box" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2172-2174">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_bounding_box" class="fn">glyph_bounding_box</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.Rect.html" title="struct ttf_parser::Rect">Rect</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a tight glyph bounding box.</p>
<p>This is just a shorthand for <code>outline_glyph()</code> since only the <code>glyf</code> table stores
a bounding box. We ignore <code>glyf</code> table bboxes because they can be malformed.
In case of CFF and variable fonts we have to actually outline
a glyph to find its bounding box.</p>
<p>When a glyph is defined by a raster or a vector image,
that can be obtained via <code>glyph_image()</code>,
the bounding box must be calculated manually and this method will return <code>None</code>.</p>
<p>Note: the returned bbox is not validated in any way. A font file can have a glyph bbox
set to zero/negative width and/or height and this is perfectly ok.
For calculated bboxes, zero width and/or height is also perfectly fine.</p>
<p>This method is affected by variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.global_bounding_box" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2178-2180">Source</a><h4 class="code-header">pub fn <a href="#method.global_bounding_box" class="fn">global_bounding_box</a>(&amp;self) -&gt; <a class="struct" href="struct.Rect.html" title="struct ttf_parser::Rect">Rect</a></h4></section></summary><div class="docblock"><p>Returns a bounding box that large enough to enclose any glyph from the face.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_raster_image" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2203-2226">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_raster_image" class="fn">glyph_raster_image</a>(
&amp;self,
glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>,
pixels_per_em: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.RasterGlyphImage.html" title="struct ttf_parser::RasterGlyphImage">RasterGlyphImage</a>&lt;'_&gt;&gt;</h4></section></summary><div class="docblock"><p>Returns a reference to a glyphs raster image.</p>
<p>A font can define a glyph using a raster or a vector image instead of a simple outline.
Which is primarily used for emojis. This method should be used to access raster images.</p>
<p><code>pixels_per_em</code> allows selecting a preferred image size. The chosen size will
be closer to an upper one. So when font has 64px and 96px images and <code>pixels_per_em</code>
is set to 72, 96px image will be returned.
To get the largest image simply use <code>std::u16::MAX</code>.</p>
<p>Note that this method will return an encoded image. It should be decoded
by the caller. We dont validate or preprocess it in any way.</p>
<p>Also, a font can contain both: images and outlines. So when this method returns <code>None</code>
you should also try <code>outline_glyph()</code> afterwards.</p>
<p>There are multiple ways an image can be stored in a TrueType font
and this method supports most of them.
This includes <code>sbix</code>, <code>bloc</code> + <code>bdat</code>, <code>EBLC</code> + <code>EBDT</code>, <code>CBLC</code> + <code>CBDT</code>.
And fonts tables will be accesses in this specific order.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_svg_image" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2240-2242">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_svg_image" class="fn">glyph_svg_image</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="svg/struct.SvgDocument.html" title="struct ttf_parser::svg::SvgDocument">SvgDocument</a>&lt;'a&gt;&gt;</h4></section></summary><div class="docblock"><p>Returns a reference to a glyphs SVG image.</p>
<p>A font can define a glyph using a raster or a vector image instead of a simple outline.
Which is primarily used for emojis. This method should be used to access SVG images.</p>
<p>Note that this method will return just an SVG data. It should be rendered
or even decompressed (in case of SVGZ) by the caller.
We dont validate or preprocess it in any way.</p>
<p>Also, a font can contain both: images and outlines. So when this method returns <code>None</code>
you should also try <code>outline_glyph()</code> afterwards.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_color_glyph" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2247-2252">Source</a><h4 class="code-header">pub fn <a href="#method.is_color_glyph" class="fn">is_color_glyph</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the glyph can be colored/painted using the <code>COLR</code>+<code>CPAL</code> tables.</p>
<p>See <a href="struct.Face.html#method.paint_color_glyph" title="method ttf_parser::Face::paint_color_glyph"><code>paint_color_glyph</code></a> for details.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.color_palettes" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2257-2259">Source</a><h4 class="code-header">pub fn <a href="#method.color_palettes" class="fn">color_palettes</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="type" href="https://doc.rust-lang.org/1.84.0/core/num/nonzero/type.NonZeroU16.html" title="type core::num::nonzero::NonZeroU16">NonZeroU16</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the number of palettes stored in the <code>COLR</code>+<code>CPAL</code> tables.</p>
<p>See <a href="struct.Face.html#method.paint_color_glyph" title="method ttf_parser::Face::paint_color_glyph"><code>paint_color_glyph</code></a> for details.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.paint_color_glyph" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2280-2295">Source</a><h4 class="code-header">pub fn <a href="#method.paint_color_glyph" class="fn">paint_color_glyph</a>(
&amp;self,
glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>,
palette: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u16.html">u16</a>,
foreground_color: <a class="struct" href="struct.RgbaColor.html" title="struct ttf_parser::RgbaColor">RgbaColor</a>,
painter: &amp;mut dyn <a class="trait" href="colr/trait.Painter.html" title="trait ttf_parser::colr::Painter">Painter</a>&lt;'a&gt;,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class="docblock"><p>Paints a color glyph from the <code>COLR</code> table.</p>
<p>A font can have multiple palettes, which you can check via
<a href="struct.Face.html#method.color_palettes" title="method ttf_parser::Face::color_palettes"><code>color_palettes</code></a>.
If unsure, just pass 0 to the <code>palette</code> argument, which is the default.</p>
<p>A font can define a glyph using layers of colored shapes instead of a
simple outline. Which is primarily used for emojis. This method should
be used to access glyphs defined in the <code>COLR</code> table.</p>
<p>Also, a font can contain both: a layered definition and outlines. So
when this method returns <code>None</code> you should also try
<a href="struct.Face.html#method.outline_glyph" title="method ttf_parser::Face::outline_glyph"><code>outline_glyph</code></a> afterwards.</p>
<p>Returns <code>None</code> if the glyph has no <code>COLR</code> definition or if the glyph
definition is malformed.</p>
<p>See <code>examples/font2svg.rs</code> for usage examples.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.variation_axes" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2300-2302">Source</a><h4 class="code-header">pub fn <a href="#method.variation_axes" class="fn">variation_axes</a>(&amp;self) -&gt; <a class="struct" href="struct.LazyArray16.html" title="struct ttf_parser::LazyArray16">LazyArray16</a>&lt;'a, <a class="struct" href="fvar/struct.VariationAxis.html" title="struct ttf_parser::fvar::VariationAxis">VariationAxis</a>&gt;</h4></section></summary><div class="docblock"><p>Returns an iterator over variation axes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_variation" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2314-2334">Source</a><h4 class="code-header">pub fn <a href="#method.set_variation" class="fn">set_variation</a>(&amp;mut self, axis: <a class="struct" href="struct.Tag.html" title="struct ttf_parser::Tag">Tag</a>, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class="docblock"><p>Sets a variation axis coordinate.</p>
<p>This is one of the two only mutable methods in the library.
We can simplify the API a lot by storing the variable coordinates
in the face object itself.</p>
<p>Since coordinates are stored on the stack, we allow only 64 of them.</p>
<p>Returns <code>None</code> when face is not variable or doesnt have such axis.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.variation_coordinates" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2339-2341">Source</a><h4 class="code-header">pub fn <a href="#method.variation_coordinates" class="fn">variation_coordinates</a>(&amp;self) -&gt; &amp;[<a class="struct" href="struct.NormalizedCoordinate.html" title="struct ttf_parser::NormalizedCoordinate">NormalizedCoordinate</a>]</h4></section></summary><div class="docblock"><p>Returns the current normalized variation coordinates.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_non_default_variation_coordinates" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2346-2348">Source</a><h4 class="code-header">pub fn <a href="#method.has_non_default_variation_coordinates" class="fn">has_non_default_variation_coordinates</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Checks that face has non-default variation coordinates.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_phantom_points" class="method"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2354-2358">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_phantom_points" class="fn">glyph_phantom_points</a>(&amp;self, glyph_id: <a class="struct" href="struct.GlyphId.html" title="struct ttf_parser::GlyphId">GlyphId</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.PhantomPoints.html" title="struct ttf_parser::PhantomPoints">PhantomPoints</a>&gt;</h4></section></summary><div class="docblock"><p>Parses glyphs phantom points.</p>
<p>Available only for variable fonts with the <code>gvar</code> table.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-Face%3C'a%3E" class="impl"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1070">Source</a><a href="#impl-Clone-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#1070">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#174">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Face%3C'_%3E" class="impl"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2398-2402">Source</a><a href="#impl-Debug-for-Face%3C'_%3E" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'_&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/ttf_parser/lib.rs.html#2399-2401">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.84.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Face%3C'a%3E" class="impl"><a href="#impl-Freeze-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section><section id="impl-RefUnwindSafe-for-Face%3C'a%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section><section id="impl-Send-for-Face%3C'a%3E" class="impl"><a href="#impl-Send-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section><section id="impl-Sync-for-Face%3C'a%3E" class="impl"><a href="#impl-Sync-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section><section id="impl-Unpin-for-Face%3C'a%3E" class="impl"><a href="#impl-Unpin-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section><section id="impl-UnwindSafe-for-Face%3C'a%3E" class="impl"><a href="#impl-UnwindSafe-for-Face%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Face.html" title="struct ttf_parser::Face">Face</a>&lt;'a&gt;</h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#273">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/clone.rs.html#275">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dst: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dst</code>. <a href="https://doc.rust-lang.org/1.84.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#82-84">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#86">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#87">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/alloc/borrow.rs.html#91">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.84.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>