49 lines
No EOL
25 KiB
HTML
49 lines
No EOL
25 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="COSMIC Text"><title>cosmic::iced::daemon::program::graphics::text::cosmic_text - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../../../../../../../" data-static-root-path="../../../../../../../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../../../../../../../static.files/storage-68b7e25d.js"></script><script defer src="../../../../../../../crates.js"></script><script defer src="../../../../../../../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../../../../../../../static.files/noscript-32bb7600.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 mod crate"><!--[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="../../../../../../../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#cosmic-text" title="COSMIC Text">COSMIC Text</a></li></ul><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>graphics::<wbr>text</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../../../index.html">cosmic</a>::<wbr><a href="../../../../../index.html">iced</a>::<wbr><a href="../../../../index.html">daemon</a>::<wbr><a href="../../../index.html">program</a>::<wbr><a href="../../index.html">graphics</a>::<wbr><a href="../index.html">text</a></div><h1>Crate <span>cosmic_text</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="cosmic-text"><a class="doc-anchor" href="#cosmic-text">§</a>COSMIC Text</h2>
|
||
<p>This library provides advanced text handling in a generic way. It provides abstractions for
|
||
shaping, font discovery, font fallback, layout, rasterization, and editing. Shaping utilizes
|
||
harfrust, font discovery utilizes fontdb, and the rasterization is optional and utilizes
|
||
swash. The other features are developed internal to this library.</p>
|
||
<p>It is recommended that you start by creating a <a href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem"><code>FontSystem</code></a>, after which you can create a
|
||
<a href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer"><code>Buffer</code></a>, provide it with some text, and then inspect the layout it produces. At this
|
||
point, you can use the <code>SwashCache</code> to rasterize glyphs into either images or pixels.</p>
|
||
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>cosmic_text::{Attrs, Color, FontSystem, SwashCache, Buffer, Metrics, Shaping};
|
||
|
||
<span class="comment">// A FontSystem provides access to detected system fonts, create one per application
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>font_system = FontSystem::new();
|
||
|
||
<span class="comment">// A SwashCache stores rasterized glyphs, create one per application
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>swash_cache = SwashCache::new();
|
||
|
||
<span class="comment">// Text metrics indicate the font size and line height of a buffer
|
||
</span><span class="kw">let </span>metrics = Metrics::new(<span class="number">14.0</span>, <span class="number">20.0</span>);
|
||
|
||
<span class="comment">// A Buffer provides shaping and layout for a UTF-8 string, create one per text widget
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>buffer = Buffer::new(<span class="kw-2">&mut </span>font_system, metrics);
|
||
|
||
<span class="comment">// Borrow buffer together with the font system for more convenient method calls
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>buffer = buffer.borrow_with(<span class="kw-2">&mut </span>font_system);
|
||
|
||
<span class="comment">// Attributes indicate what font to choose
|
||
</span><span class="kw">let </span>attrs = Attrs::new();
|
||
|
||
<span class="comment">// Set size and text
|
||
</span>buffer.set_size(<span class="prelude-val">Some</span>(<span class="number">80.0</span>), <span class="prelude-val">Some</span>(<span class="number">25.0</span>));
|
||
buffer.set_text(<span class="string">"Hello, Rust! 🦀\n"</span>, <span class="kw-2">&</span>attrs, Shaping::Advanced, <span class="prelude-val">None</span>);
|
||
|
||
<span class="comment">// Inspect the output runs
|
||
</span><span class="kw">for </span>run <span class="kw">in </span>buffer.layout_runs() {
|
||
<span class="kw">for </span>glyph <span class="kw">in </span>run.glyphs.iter() {
|
||
<span class="macro">println!</span>(<span class="string">"{:#?}"</span>, glyph);
|
||
}
|
||
}
|
||
|
||
<span class="comment">// Create a default text color
|
||
</span><span class="kw">let </span>text_color = Color::rgb(<span class="number">0xFF</span>, <span class="number">0xFF</span>, <span class="number">0xFF</span>);
|
||
|
||
<span class="comment">// Draw the buffer (for performance, instead use SwashCache directly)
|
||
</span>buffer.draw(<span class="kw-2">&mut </span>swash_cache, text_color, |x, y, w, h, color| {
|
||
<span class="comment">// Fill in your code here for drawing rectangles
|
||
</span>});</code></pre></div>
|
||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="fallback/index.html" title="mod cosmic::iced::daemon::program::graphics::text::cosmic_text::fallback">fallback</a></dt><dt><a class="mod" href="fontdb/index.html" title="mod cosmic::iced::daemon::program::graphics::text::cosmic_text::fontdb">fontdb</a></dt><dd><code>fontdb</code> is a simple, in-memory font database with CSS-like queries.</dd><dt><a class="mod" href="harfrust/index.html" title="mod cosmic::iced::daemon::program::graphics::text::cosmic_text::harfrust">harfrust</a></dt><dd>A complete <a href="https://github.com/harfbuzz/harfbuzz">harfbuzz</a> shaping algorithm port to Rust.</dd><dt><a class="mod" href="skrifa/index.html" title="mod cosmic::iced::daemon::program::graphics::text::cosmic_text::skrifa">skrifa</a></dt><dd>A robust, ergonomic, high performance crate for OpenType fonts.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Angle.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Angle">Angle</a></dt><dd>Represents an angle in degrees or radians.</dd><dt><a class="struct" href="struct.Attrs.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Attrs">Attrs</a></dt><dd>Text attributes</dd><dt><a class="struct" href="struct.AttrsList.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsList">Attrs<wbr>List</a></dt><dd>List of text attributes to apply to a line</dd><dt><a class="struct" href="struct.AttrsOwned.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::AttrsOwned">Attrs<wbr>Owned</a></dt><dd>An owned version of <a href="struct.Attrs.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Attrs"><code>Attrs</code></a></dd><dt><a class="struct" href="struct.BidiParagraphs.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::BidiParagraphs">Bidi<wbr>Paragraphs</a></dt><dd>An iterator over the paragraphs in the input text.
|
||
It is equivalent to <a href="../../../../../../cctk/sctk/reexports/client/backend/smallvec/alloc/str/struct.Lines.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::str::Lines"><code>core::str::Lines</code></a> but follows <code>unicode-bidi</code> behaviour.</dd><dt><a class="struct" href="struct.BorrowedWithFontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::BorrowedWithFontSystem">Borrowed<wbr>With<wbr>Font<wbr>System</a></dt><dd>A value borrowed together with an <a href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem"><code>FontSystem</code></a></dd><dt><a class="struct" href="struct.Buffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Buffer">Buffer</a></dt><dd>A buffer of text that is shaped and laid out</dd><dt><a class="struct" href="struct.BufferLine.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferLine">Buffer<wbr>Line</a></dt><dd>A line (or paragraph) of text that is shaped and laid out</dd><dt><a class="struct" href="struct.CacheKey.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::CacheKey">Cache<wbr>Key</a></dt><dd>Key for building a glyph cache</dd><dt><a class="struct" href="struct.CacheKeyFlags.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::CacheKeyFlags">Cache<wbr>KeyFlags</a></dt><dd>Flags that change rendering</dd><dt><a class="struct" href="struct.CacheMetrics.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::CacheMetrics">Cache<wbr>Metrics</a></dt><dd>Metrics, but implementing Eq and Hash using u32 representation of f32</dd><dt><a class="struct" href="struct.Change.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Change">Change</a></dt><dd>A set of change items grouped into one logical change</dd><dt><a class="struct" href="struct.ChangeItem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ChangeItem">Change<wbr>Item</a></dt><dd>A unique change to an editor</dd><dt><a class="struct" href="struct.Color.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Color">Color</a></dt><dd>Text color</dd><dt><a class="struct" href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor">Cursor</a></dt><dd>Current cursor location</dd><dt><a class="struct" href="struct.DecorationMetrics.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::DecorationMetrics">Decoration<wbr>Metrics</a></dt><dd>Offset and thickness for a text decoration line, in EM units.</dd><dt><a class="struct" href="struct.DecorationSpan.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::DecorationSpan">Decoration<wbr>Span</a></dt><dd>A span of consecutive glyphs sharing the same text decoration.</dd><dt><a class="struct" href="struct.Editor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Editor">Editor</a></dt><dd>A wrapper of [<code>Buffer</code>] for easy editing</dd><dt><a class="struct" href="struct.Feature.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Feature">Feature</a></dt><dt><a class="struct" href="struct.FeatureTag.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FeatureTag">Feature<wbr>Tag</a></dt><dd>A 4-byte <code>OpenType</code> feature tag identifier</dd><dt><a class="struct" href="struct.Font.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Font">Font</a></dt><dd>A font</dd><dt><a class="struct" href="struct.FontFeatures.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontFeatures">Font<wbr>Features</a></dt><dt><a class="struct" href="struct.FontMatchAttrs.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontMatchAttrs">Font<wbr>Match<wbr>Attrs</a></dt><dd>Font-specific part of <a href="struct.Attrs.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Attrs"><code>Attrs</code></a> to be used for matching</dd><dt><a class="struct" href="struct.FontMatchKey.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontMatchKey">Font<wbr>Match<wbr>Key</a></dt><dt><a class="struct" href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem">Font<wbr>System</a></dt><dd>Access to the system fonts.</dd><dt><a class="struct" href="struct.GlyphDecorationData.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::GlyphDecorationData">Glyph<wbr>Decoration<wbr>Data</a></dt><dt><a class="struct" href="struct.LayoutCursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutCursor">Layout<wbr>Cursor</a></dt><dd>The position of a cursor within a [<code>Buffer</code>].</dd><dt><a class="struct" href="struct.LayoutGlyph.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutGlyph">Layout<wbr>Glyph</a></dt><dd>A laid out glyph</dd><dt><a class="struct" href="struct.LayoutLine.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutLine">Layout<wbr>Line</a></dt><dd>A line of laid out glyphs</dd><dt><a class="struct" href="struct.LayoutRun.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutRun">Layout<wbr>Run</a></dt><dd>A line of visible text for rendering</dd><dt><a class="struct" href="struct.LayoutRunIter.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutRunIter">Layout<wbr>RunIter</a></dt><dd>An iterator of visible text lines, see <a href="struct.LayoutRun.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LayoutRun"><code>LayoutRun</code></a></dd><dt><a class="struct" href="struct.LegacyRenderer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LegacyRenderer">Legacy<wbr>Renderer</a></dt><dd>Helper to migrate from old renderer</dd><dt><a class="struct" href="struct.LetterSpacing.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LetterSpacing">Letter<wbr>Spacing</a></dt><dd>A wrapper for letter spacing to get around that f32 doesn’t implement Eq and Hash</dd><dt><a class="struct" href="struct.LineIter.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::LineIter">Line<wbr>Iter</a></dt><dd>Iterator over lines terminated by <a href="enum.LineEnding.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::LineEnding"><code>LineEnding</code></a></dd><dt><a class="struct" href="struct.Metrics.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Metrics">Metrics</a></dt><dd>Metrics of text</dd><dt><a class="struct" href="struct.PhysicalGlyph.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::PhysicalGlyph">Physical<wbr>Glyph</a></dt><dt><a class="struct" href="struct.Placement.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Placement">Placement</a></dt><dd>Describes the offset and dimensions of a rendered mask.</dd><dt><a class="struct" href="struct.PlatformFallback.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::PlatformFallback">Platform<wbr>Fallback</a></dt><dd>A platform-specific font fallback list, for Unix.</dd><dt><a class="struct" href="struct.Scroll.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Scroll">Scroll</a></dt><dd>Scroll position in [<code>Buffer</code>]</dd><dt><a class="struct" href="struct.ShapeBuffer.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeBuffer">Shape<wbr>Buffer</a></dt><dd>A set of buffers containing allocations for shaped text.</dd><dt><a class="struct" href="struct.ShapeGlyph.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeGlyph">Shape<wbr>Glyph</a></dt><dd>A shaped glyph</dd><dt><a class="struct" href="struct.ShapeLine.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeLine">Shape<wbr>Line</a></dt><dd>A shaped line (or paragraph)</dd><dt><a class="struct" href="struct.ShapeRunCache.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeRunCache">Shape<wbr>RunCache</a></dt><dd>A helper structure for caching shape runs.</dd><dt><a class="struct" href="struct.ShapeRunKey.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeRunKey">Shape<wbr>RunKey</a></dt><dd>Key for caching shape runs.</dd><dt><a class="struct" href="struct.ShapeSpan.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeSpan">Shape<wbr>Span</a></dt><dd>A shaped span (for bidirectional processing)</dd><dt><a class="struct" href="struct.ShapeWord.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::ShapeWord">Shape<wbr>Word</a></dt><dd>A shaped word (for word wrapping)</dd><dt><a class="struct" href="struct.SwashCache.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::SwashCache">Swash<wbr>Cache</a></dt><dd>Cache for rasterizing with the swash scaler</dd><dt><a class="struct" href="struct.SwashImage.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::SwashImage">Swash<wbr>Image</a></dt><dd>Scaled glyph image.</dd><dt><a class="struct" href="struct.TextDecoration.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::TextDecoration">Text<wbr>Decoration</a></dt><dt><a class="struct" href="struct.Transform.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Transform">Transform</a></dt><dd>Two dimensional transformation matrix.</dd><dt><a class="struct" href="struct.Weight.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Weight">Weight</a></dt><dd>Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Action.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Action">Action</a></dt><dd>An action to perform on an <a href="struct.Editor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Editor"><code>Editor</code></a></dd><dt><a class="enum" href="enum.Affinity.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Affinity">Affinity</a></dt><dd>Whether to associate cursors placed at a boundary between runs with the run before or after it.</dd><dt><a class="enum" href="enum.Align.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Align">Align</a></dt><dd>Align or justify</dd><dt><a class="enum" href="enum.BufferRef.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::BufferRef">Buffer<wbr>Ref</a></dt><dt><a class="enum" href="enum.Cached.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Cached">Cached</a></dt><dd>Helper for caching a value when the value is optionally present in the ‘unused’ state.</dd><dt><a class="enum" href="enum.Command.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Command">Command</a></dt><dd>Path command.</dd><dt><a class="enum" href="enum.Ellipsize.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Ellipsize">Ellipsize</a></dt><dt><a class="enum" href="enum.EllipsizeHeightLimit.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::EllipsizeHeightLimit">Ellipsize<wbr>Height<wbr>Limit</a></dt><dt><a class="enum" href="enum.Family.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Family">Family</a></dt><dd>A <a href="https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-family">font family</a>.</dd><dt><a class="enum" href="enum.FamilyOwned.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::FamilyOwned">Family<wbr>Owned</a></dt><dd>An owned version of <a href="enum.Family.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Family"><code>Family</code></a></dd><dt><a class="enum" href="enum.Hinting.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Hinting">Hinting</a></dt><dd>Metrics hinting strategy</dd><dt><a class="enum" href="enum.LineEnding.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::LineEnding">Line<wbr>Ending</a></dt><dd>Line ending</dd><dt><a class="enum" href="enum.Motion.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Motion">Motion</a></dt><dd>A motion to perform on a <a href="struct.Cursor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Cursor"><code>Cursor</code></a></dd><dt><a class="enum" href="enum.Selection.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Selection">Selection</a></dt><dd>Selection mode</dd><dt><a class="enum" href="enum.Shaping.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Shaping">Shaping</a></dt><dd>The shaping strategy of some text.</dd><dt><a class="enum" href="enum.Stretch.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Stretch">Stretch</a></dt><dd>A face <a href="https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswidthclass">width</a>.</dd><dt><a class="enum" href="enum.Style.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Style">Style</a></dt><dd>Allows italic or oblique faces to be selected.</dd><dt><a class="enum" href="enum.SubpixelBin.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::SubpixelBin">Subpixel<wbr>Bin</a></dt><dd>Binning of subpixel position for cache optimization</dd><dt><a class="enum" href="enum.SwashContent.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::SwashContent">Swash<wbr>Content</a></dt><dd>Content of a scaled glyph image.</dd><dt><a class="enum" href="enum.UnderlineStyle.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::UnderlineStyle">Underline<wbr>Style</a></dt><dt><a class="enum" href="enum.Wrap.html" title="enum cosmic::iced::daemon::program::graphics::text::cosmic_text::Wrap">Wrap</a></dt><dd>Wrapping mode</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Edit.html" title="trait cosmic::iced::daemon::program::graphics::text::cosmic_text::Edit">Edit</a></dt><dd>A trait to allow easy replacements of <a href="struct.Editor.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::Editor"><code>Editor</code></a>, like <code>SyntaxEditor</code></dd><dt><a class="trait" href="trait.Fallback.html" title="trait cosmic::iced::daemon::program::graphics::text::cosmic_text::Fallback">Fallback</a></dt><dd>The <code>Fallback</code> trait allows for configurable font fallback lists to be set during construction of the <a href="struct.FontSystem.html" title="struct cosmic::iced::daemon::program::graphics::text::cosmic_text::FontSystem"><code>FontSystem</code></a>.</dd><dt><a class="trait" href="trait.Renderer.html" title="trait cosmic::iced::daemon::program::graphics::text::cosmic_text::Renderer">Renderer</a></dt><dd>Custom renderer for buffers and editors</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.render_decoration.html" title="fn cosmic::iced::daemon::program::graphics::text::cosmic_text::render_decoration">render_<wbr>decoration</a></dt><dd>Draw text decoration lines (underline, strikethrough, overline) for a layout run.</dd></dl></section></div></main></body></html> |