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

17 lines
12 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="Font introspection, complex text shaping and glyph rendering."><title>swash - 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="swash" 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="../crates.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 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="../swash/index.html">swash</a><span class="version">0.1.19</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="#note" title="Note">Note</a></li><li><a href="#usage" title="Usage">Usage</a></li></ul><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><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><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></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"><h1>Crate <span>swash</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/swash/lib.rs.html#1-174">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Font introspection, complex text shaping and glyph rendering.</p>
<p>For a comprehensive list of features provided by this crate, please check out
the <a href="https://github.com/dfrg/swash/blob/master/README.md">readme</a> on GitHub.</p>
<h2 id="note"><a class="doc-anchor" href="#note">§</a>Note</h2>
<p>This is a low level library focusing on implementations of OpenType and
various related Unicode specifications for building high quality, high performance
text layout and rendering components with minimal overhead.</p>
<p>If youre looking for something higher level, please stay tuned work is in
progress.</p>
<h2 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h2>
<p>The primary currency in this crate is the <a href="struct.FontRef.html" title="struct swash::FontRef"><code>FontRef</code></a> struct so youll want to
start there to learn how to construct and use fonts.</p>
<p>Documentation for <a href="shape/index.html" title="mod swash::shape">shaping</a> and <a href="scale/index.html" title="mod swash::scale">scaling</a> is provided in
the respective modules.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.zeno"><code>pub use <a class="mod" href="../zeno/index.html" title="mod zeno">zeno</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="iter/index.html" title="mod swash::iter">iter</a></div><div class="desc docblock-short">Collection of various iterators over metadata contained in a font.</div></li><li><div class="item-name"><a class="mod" href="proxy/index.html" title="mod swash::proxy">proxy</a></div><div class="desc docblock-short">Proxies used to efficiently rematerialize metadata.</div></li><li><div class="item-name"><a class="mod" href="scale/index.html" title="mod swash::scale">scale</a></div><div class="desc docblock-short">Scaling, hinting and rasterization of visual glyph representations.</div></li><li><div class="item-name"><a class="mod" href="shape/index.html" title="mod swash::shape">shape</a></div><div class="desc docblock-short">Mapping complex text to a sequence of positioned glyphs.</div></li><li><div class="item-name"><a class="mod" href="text/index.html" title="mod swash::text">text</a></div><div class="desc docblock-short">Character properties and textual analysis.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Attributes.html" title="struct swash::Attributes">Attributes</a></div><div class="desc docblock-short">Primary attributes for font classification: stretch, weight and style.</div></li><li><div class="item-name"><a class="struct" href="struct.BitmapStrike.html" title="struct swash::BitmapStrike">Bitmap<wbr>Strike</a></div><div class="desc docblock-short">Collection of bitmaps of a specific size and format.</div></li><li><div class="item-name"><a class="struct" href="struct.CacheKey.html" title="struct swash::CacheKey">Cache<wbr>Key</a></div><div class="desc docblock-short">Uniquely generated value for identifying and caching fonts.</div></li><li><div class="item-name"><a class="struct" href="struct.Charmap.html" title="struct swash::Charmap">Charmap</a></div><div class="desc docblock-short">Maps characters to nominal glyph identifiers.</div></li><li><div class="item-name"><a class="struct" href="struct.ColorPalette.html" title="struct swash::ColorPalette">Color<wbr>Palette</a></div><div class="desc docblock-short">Collection of colors.</div></li><li><div class="item-name"><a class="struct" href="struct.Feature.html" title="struct swash::Feature">Feature</a></div><div class="desc docblock-short">Typographic rule that produces modifications to a sequence of glyphs.</div></li><li><div class="item-name"><a class="struct" href="struct.FontDataRef.html" title="struct swash::FontDataRef">Font<wbr>Data<wbr>Ref</a></div><div class="desc docblock-short">Reference to the content of a font file.</div></li><li><div class="item-name"><a class="struct" href="struct.FontRef.html" title="struct swash::FontRef">FontRef</a></div><div class="desc docblock-short">Reference to a font.</div></li><li><div class="item-name"><a class="struct" href="struct.GlyphMetrics.html" title="struct swash::GlyphMetrics">Glyph<wbr>Metrics</a></div><div class="desc docblock-short">Glyph advances, side bearings and vertical origins.</div></li><li><div class="item-name"><a class="struct" href="struct.Instance.html" title="struct swash::Instance">Instance</a></div><div class="desc docblock-short">Named instance in a variable font.</div></li><li><div class="item-name"><a class="struct" href="struct.LocalizedString.html" title="struct swash::LocalizedString">Localized<wbr>String</a></div><div class="desc docblock-short">Represents a single localized string in a font.</div></li><li><div class="item-name"><a class="struct" href="struct.Metrics.html" title="struct swash::Metrics">Metrics</a></div><div class="desc docblock-short">Global font metrics.</div></li><li><div class="item-name"><a class="struct" href="struct.ObliqueAngle.html" title="struct swash::ObliqueAngle">Oblique<wbr>Angle</a></div><div class="desc docblock-short">Angle of an oblique style in degrees from -90 to 90.</div></li><li><div class="item-name"><a class="struct" href="struct.Setting.html" title="struct swash::Setting">Setting</a></div><div class="desc docblock-short">Setting combining a tag and a value for features and variations.</div></li><li><div class="item-name"><a class="struct" href="struct.Stretch.html" title="struct swash::Stretch">Stretch</a></div><div class="desc docblock-short">Visual width of a font a relative change from the normal aspect
ratio.</div></li><li><div class="item-name"><a class="struct" href="struct.Synthesis.html" title="struct swash::Synthesis">Synthesis</a></div><div class="desc docblock-short">Synthesis suggestions for mismatched font attributes.</div></li><li><div class="item-name"><a class="struct" href="struct.Variation.html" title="struct swash::Variation">Variation</a></div><div class="desc docblock-short">Axis of variation in a variable font.</div></li><li><div class="item-name"><a class="struct" href="struct.Weight.html" title="struct swash::Weight">Weight</a></div><div class="desc docblock-short">Visual weight class of a font on a scale from 1 to 1000.</div></li><li><div class="item-name"><a class="struct" href="struct.WritingSystem.html" title="struct swash::WritingSystem">Writing<wbr>System</a></div><div class="desc docblock-short">Script, language and associated typographic features available in a font.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Action.html" title="enum swash::Action">Action</a></div><div class="desc docblock-short">Modification performed by a feature.</div></li><li><div class="item-name"><a class="enum" href="enum.StringId.html" title="enum swash::StringId">String<wbr>Id</a></div><div class="desc docblock-short">Identifier for well-known localized strings in a font.</div></li><li><div class="item-name"><a class="enum" href="enum.Style.html" title="enum swash::Style">Style</a></div><div class="desc docblock-short">Visual style or slope of a font.</div></li><li><div class="item-name"><a class="enum" href="enum.Usability.html" title="enum swash::Usability">Usability</a></div><div class="desc docblock-short">Theme of a palette with respect to background color.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.TableProvider.html" title="trait swash::TableProvider">Table<wbr>Provider</a></div><div class="desc docblock-short">Source that can provide table data by tag.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.tag_from_bytes.html" title="fn swash::tag_from_bytes">tag_<wbr>from_<wbr>bytes</a></div><div class="desc docblock-short">Creates a tag from four bytes.</div></li><li><div class="item-name"><a class="fn" href="fn.tag_from_str_lossy.html" title="fn swash::tag_from_str_lossy">tag_<wbr>from_<wbr>str_<wbr>lossy</a></div><div class="desc docblock-short">Creates a tag from the first four bytes of a string, inserting
spaces for any missing bytes.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.GlyphId.html" title="type swash::GlyphId">GlyphId</a></div><div class="desc docblock-short">Glyph identifier.</div></li><li><div class="item-name"><a class="type" href="type.NormalizedCoord.html" title="type swash::NormalizedCoord">Normalized<wbr>Coord</a></div><div class="desc docblock-short">Normalized variation coordinate in 2.14 fixed point format.</div></li><li><div class="item-name"><a class="type" href="type.Tag.html" title="type swash::Tag">Tag</a></div><div class="desc docblock-short">Four byte tag value.</div></li></ul></section></div></main></body></html>