75 lines
43 KiB
HTML
75 lines
43 KiB
HTML
<!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="The collection of fonts used by `epaint`."><title>Fonts in egui::text - 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="egui" 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="../../egui/index.html">egui</a><span class="version">0.30.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Fonts</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.begin_pass" title="begin_pass">begin_pass</a></li><li><a href="#method.families" title="families">families</a></li><li><a href="#method.font_atlas_fill_ratio" title="font_atlas_fill_ratio">font_atlas_fill_ratio</a></li><li><a href="#method.font_image_delta" title="font_image_delta">font_image_delta</a></li><li><a href="#method.font_image_size" title="font_image_size">font_image_size</a></li><li><a href="#method.glyph_width" title="glyph_width">glyph_width</a></li><li><a href="#method.has_glyph" title="has_glyph">has_glyph</a></li><li><a href="#method.has_glyphs" title="has_glyphs">has_glyphs</a></li><li><a href="#method.image" title="image">image</a></li><li><a href="#method.layout" title="layout">layout</a></li><li><a href="#method.layout_delayed_color" title="layout_delayed_color">layout_delayed_color</a></li><li><a href="#method.layout_job" title="layout_job">layout_job</a></li><li><a href="#method.layout_no_wrap" title="layout_no_wrap">layout_no_wrap</a></li><li><a href="#method.max_texture_side" title="max_texture_side">max_texture_side</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.num_galleys_in_cache" title="num_galleys_in_cache">num_galleys_in_cache</a></li><li><a href="#method.pixels_per_point" title="pixels_per_point">pixels_per_point</a></li><li><a href="#method.row_height" title="row_height">row_height</a></li><li><a href="#method.texture_atlas" title="texture_atlas">texture_atlas</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-Fonts" title="Clone">Clone</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Fonts" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-Fonts" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-Fonts" title="Freeze">Freeze</a></li><li><a href="#impl-Send-for-Fonts" title="Send">Send</a></li><li><a href="#impl-Sync-for-Fonts" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Fonts" title="Unpin">Unpin</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<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></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<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-SerializableAny-for-T" title="SerializableAny">SerializableAny</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<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In egui::<wbr>text</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">egui</a>::<wbr><a href="index.html">text</a></span><h1>Struct <span class="struct">Fonts</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/epaint/text/fonts.rs.html#417">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Fonts(<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>The collection of fonts used by <code>epaint</code>.</p>
|
|
<p>Required in order to paint text. Create one and reuse. Cheap to clone.</p>
|
|
<p>Each <a href="struct.Fonts.html" title="struct egui::text::Fonts"><code>Fonts</code></a> comes with a font atlas textures that needs to be used when painting.</p>
|
|
<p>If you are using <code>egui</code>, use <code>egui::Context::set_fonts</code> and <code>egui::Context::fonts</code>.</p>
|
|
<p>You need to call <a href="struct.Fonts.html#method.begin_pass" title="method egui::text::Fonts::begin_pass"><code>Self::begin_pass</code></a> and <a href="struct.Fonts.html#method.font_image_delta" title="method egui::text::Fonts::font_image_delta"><code>Self::font_image_delta</code></a> once every frame.</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-Fonts" class="impl"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#419">Source</a><a href="#impl-Fonts" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#425-429">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
|
|
pixels_per_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
|
|
max_texture_side: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>,
|
|
definitions: <a class="struct" href="../struct.FontDefinitions.html" title="struct egui::FontDefinitions">FontDefinitions</a>,
|
|
) -> <a class="struct" href="struct.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h4></section></summary><div class="docblock"><p>Create a new <a href="struct.Fonts.html" title="struct egui::text::Fonts"><code>Fonts</code></a> for text layout.
|
|
This call is expensive, so only create one <a href="struct.Fonts.html" title="struct egui::text::Fonts"><code>Fonts</code></a> and then reuse it.</p>
|
|
<ul>
|
|
<li><code>pixels_per_point</code>: how many physical pixels per logical “point”.</li>
|
|
<li><code>max_texture_side</code>: largest supported texture size (one side).</li>
|
|
</ul>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.begin_pass" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#444">Source</a><h4 class="code-header">pub fn <a href="#method.begin_pass" class="fn">begin_pass</a>(&self, pixels_per_point: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>, max_texture_side: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Call at the start of each frame with the latest known
|
|
<code>pixels_per_point</code> and <code>max_texture_side</code>.</p>
|
|
<p>Call after painting the previous frame, but before using <a href="struct.Fonts.html" title="struct egui::text::Fonts"><code>Fonts</code></a> for the new frame.</p>
|
|
<p>This function will react to changes in <code>pixels_per_point</code> and <code>max_texture_side</code>,
|
|
as well as notice when the font atlas is getting full, and handle that.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.font_image_delta" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#466">Source</a><h4 class="code-header">pub fn <a href="#method.font_image_delta" class="fn">font_image_delta</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../epaint/image/struct.ImageDelta.html" title="struct epaint::image::ImageDelta">ImageDelta</a>></h4></section></summary><div class="docblock"><p>Call at the end of each frame (before painting) to get the change to the font texture since last call.</p>
|
|
</div></details><section id="method.pixels_per_point" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#478">Source</a><h4 class="code-header">pub fn <a href="#method.pixels_per_point" class="fn">pixels_per_point</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a></h4></section><section id="method.max_texture_side" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#483">Source</a><h4 class="code-header">pub fn <a href="#method.max_texture_side" class="fn">max_texture_side</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.texture_atlas" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#489">Source</a><h4 class="code-header">pub fn <a href="#method.texture_atlas" class="fn">texture_atlas</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../mutex/struct.Mutex.html" title="struct egui::mutex::Mutex">Mutex</a><<a class="struct" href="../../epaint/texture_atlas/struct.TextureAtlas.html" title="struct epaint::texture_atlas::TextureAtlas">TextureAtlas</a>>></h4></section></summary><div class="docblock"><p>The font atlas.
|
|
Pass this to <a href="../../epaint/tessellator/struct.Tessellator.html" title="struct epaint::tessellator::Tessellator"><code>crate::Tessellator</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.image" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#495">Source</a><h4 class="code-header">pub fn <a href="#method.image" class="fn">image</a>(&self) -> <a class="struct" href="../struct.FontImage.html" title="struct egui::FontImage">FontImage</a></h4></section></summary><div class="docblock"><p>The full font atlas image.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.font_image_size" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#501">Source</a><h4 class="code-header">pub fn <a href="#method.font_image_size" class="fn">font_image_size</a>(&self) -> [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">2</a>]</h4></section></summary><div class="docblock"><p>Current size of the font image.
|
|
Pass this to <a href="../../epaint/tessellator/struct.Tessellator.html" title="struct epaint::tessellator::Tessellator"><code>crate::Tessellator</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.glyph_width" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#507">Source</a><h4 class="code-header">pub fn <a href="#method.glyph_width" class="fn">glyph_width</a>(&self, font_id: &<a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>, c: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.char.html">char</a>) -> <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>Width of this character in points.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_glyph" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#513">Source</a><h4 class="code-header">pub fn <a href="#method.has_glyph" class="fn">has_glyph</a>(&self, font_id: &<a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>, c: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.char.html">char</a>) -> <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>Can we display this glyph?</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.has_glyphs" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#518">Source</a><h4 class="code-header">pub fn <a href="#method.has_glyphs" class="fn">has_glyphs</a>(&self, font_id: &<a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>, s: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> <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>Can we display all the glyphs in this text?</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.row_height" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#524">Source</a><h4 class="code-header">pub fn <a href="#method.row_height" class="fn">row_height</a>(&self, font_id: &<a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>) -> <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>Height of one row of text in points</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.families" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#529">Source</a><h4 class="code-header">pub fn <a href="#method.families" class="fn">families</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../enum.FontFamily.html" title="enum egui::FontFamily">FontFamily</a>></h4></section></summary><div class="docblock"><p>List of all known font families.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.layout_job" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#547">Source</a><h4 class="code-header">pub fn <a href="#method.layout_job" class="fn">layout_job</a>(&self, job: <a class="struct" href="struct.LayoutJob.html" title="struct egui::text::LayoutJob">LayoutJob</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../struct.Galley.html" title="struct egui::Galley">Galley</a>></h4></section></summary><div class="docblock"><p>Layout some text.</p>
|
|
<p>This is the most advanced layout function.
|
|
See also <a href="struct.Fonts.html#method.layout" title="method egui::text::Fonts::layout"><code>Self::layout</code></a>, <a href="struct.Fonts.html#method.layout_no_wrap" title="method egui::text::Fonts::layout_no_wrap"><code>Self::layout_no_wrap</code></a> and
|
|
<a href="struct.Fonts.html#method.layout_delayed_color" title="method egui::text::Fonts::layout_delayed_color"><code>Self::layout_delayed_color</code></a>.</p>
|
|
<p>The implementation uses memoization so repeated calls are cheap.</p>
|
|
</div></details><section id="method.num_galleys_in_cache" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#551">Source</a><h4 class="code-header">pub fn <a href="#method.num_galleys_in_cache" class="fn">num_galleys_in_cache</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.font_atlas_fill_ratio" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#559">Source</a><h4 class="code-header">pub fn <a href="#method.font_atlas_fill_ratio" class="fn">font_atlas_fill_ratio</a>(&self) -> <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>How full is the font atlas?</p>
|
|
<p>This increases as new fonts and/or glyphs are used,
|
|
but can also decrease in a call to <a href="struct.Fonts.html#method.begin_pass" title="method egui::text::Fonts::begin_pass"><code>Self::begin_pass</code></a>.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.layout" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#566-572">Source</a><h4 class="code-header">pub fn <a href="#method.layout" class="fn">layout</a>(
|
|
&self,
|
|
text: <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
|
font_id: <a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>,
|
|
color: <a class="struct" href="../struct.Color32.html" title="struct egui::Color32">Color32</a>,
|
|
wrap_width: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
|
|
) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../struct.Galley.html" title="struct egui::Galley">Galley</a>></h4></section></summary><div class="docblock"><p>Will wrap text at the given width and line break at <code>\n</code>.</p>
|
|
<p>The implementation uses memoization so repeated calls are cheap.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.layout_no_wrap" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#580-585">Source</a><h4 class="code-header">pub fn <a href="#method.layout_no_wrap" class="fn">layout_no_wrap</a>(
|
|
&self,
|
|
text: <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
|
font_id: <a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>,
|
|
color: <a class="struct" href="../struct.Color32.html" title="struct egui::Color32">Color32</a>,
|
|
) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../struct.Galley.html" title="struct egui::Galley">Galley</a>></h4></section></summary><div class="docblock"><p>Will line break at <code>\n</code>.</p>
|
|
<p>The implementation uses memoization so repeated calls are cheap.</p>
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.layout_delayed_color" class="method"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#593-598">Source</a><h4 class="code-header">pub fn <a href="#method.layout_delayed_color" class="fn">layout_delayed_color</a>(
|
|
&self,
|
|
text: <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
|
|
font_id: <a class="struct" href="../struct.FontId.html" title="struct egui::FontId">FontId</a>,
|
|
wrap_width: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>,
|
|
) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><<a class="struct" href="../struct.Galley.html" title="struct egui::Galley">Galley</a>></h4></section></summary><div class="docblock"><p>Like <a href="struct.Fonts.html#method.layout" title="method egui::text::Fonts::layout"><code>Self::layout</code></a>, made for when you want to pick a color for the text later.</p>
|
|
<p>The implementation uses memoization so repeated calls are cheap.</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-Fonts" class="impl"><a class="src rightside" href="../../src/epaint/text/fonts.rs.html#416">Source</a><a href="#impl-Clone-for-Fonts" class="anchor">§</a><h3 class="code-header">impl <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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></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/epaint/text/fonts.rs.html#416">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>(&self) -> <a class="struct" href="struct.Fonts.html" title="struct egui::text::Fonts">Fonts</a></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>(&mut self, source: &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></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-Fonts" class="impl"><a href="#impl-Freeze-for-Fonts" class="anchor">§</a><h3 class="code-header">impl <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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section><section id="impl-RefUnwindSafe-for-Fonts" class="impl"><a href="#impl-RefUnwindSafe-for-Fonts" class="anchor">§</a><h3 class="code-header">impl !<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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section><section id="impl-Send-for-Fonts" class="impl"><a href="#impl-Send-for-Fonts" class="anchor">§</a><h3 class="code-header">impl <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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section><section id="impl-Sync-for-Fonts" class="impl"><a href="#impl-Sync-for-Fonts" class="anchor">§</a><h3 class="code-header">impl <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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section><section id="impl-Unpin-for-Fonts" class="impl"><a href="#impl-Unpin-for-Fonts" class="anchor">§</a><h3 class="code-header">impl <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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></h3></section><section id="impl-UnwindSafe-for-Fonts" class="impl"><a href="#impl-UnwindSafe-for-Fonts" class="anchor">§</a><h3 class="code-header">impl !<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.Fonts.html" title="struct egui::text::Fonts">Fonts</a></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<T> <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>(&self) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> 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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> 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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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<T> <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>(&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<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> 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) -> 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<T, 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><U> 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><T>,</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) -> 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><T> 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<T> <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>(&self) -> 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>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&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<T, 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><U> 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><T>,</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) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <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><U>>::<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'>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<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> 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><T>,</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> = <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><T>>::<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) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <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><T>>::<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'>Performs the conversion.</div></details></div></details><section id="impl-SerializableAny-for-T" class="impl"><a class="src rightside" href="../../src/egui/util/id_type_map.rs.html#54">Source</a><a href="#impl-SerializableAny-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="../util/id_type_map/trait.SerializableAny.html" title="trait egui::util::id_type_map::SerializableAny">SerializableAny</a> for T<div class="where">where
|
|
T: 'static + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <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> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section></div></section></div></main></body></html> |