From 33928a00dc58250e24da1dae4e5db17e7b598d70 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 3 Nov 2022 16:50:26 +0100 Subject: Tidy up library --- library/src/text/shaping.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'library/src/text/shaping.rs') diff --git a/library/src/text/shaping.rs b/library/src/text/shaping.rs index 32143862..bab02eca 100644 --- a/library/src/text/shaping.rs +++ b/library/src/text/shaping.rs @@ -13,7 +13,7 @@ use crate::prelude::*; /// This type contains owned or borrowed shaped text runs, which can be /// measured, used to reshape substrings more quickly and converted into a /// frame. -pub struct ShapedText<'a> { +pub(super) struct ShapedText<'a> { /// The text that was shaped. pub text: &'a str, /// The text direction. @@ -32,7 +32,7 @@ pub struct ShapedText<'a> { /// A single glyph resulting from shaping. #[derive(Debug, Clone)] -pub struct ShapedGlyph { +pub(super) struct ShapedGlyph { /// The font the glyph is contained in. pub font: Font, /// The glyph's index in the font. @@ -318,7 +318,7 @@ struct ShapingContext<'a> { } /// Shape text into [`ShapedText`]. -pub fn shape<'a>( +pub(super) fn shape<'a>( world: Tracked, text: &'a str, styles: StyleChain<'a>, @@ -534,7 +534,7 @@ fn nbsp_delta(font: &Font) -> Option { Some(font.advance(nbsp)? - font.advance(space)?) } -/// Resolve the font variant with `BOLD` and `ITALIC` factored in. +/// Resolve the font variant. pub fn variant(styles: StyleChain) -> FontVariant { let mut variant = FontVariant::new( styles.get(TextNode::STYLE), -- cgit v1.2.3