pub struct HyphenationStyle {
pub enabled: bool,
pub language: String,
pub min_word_chars: u8,
pub dictionary_path: Option<String>,
}Expand description
Word-hyphenation settings. When enabled, the renderer pre-walks
body text and inserts soft hyphens (U+00AD) at every Knuth–Liang
hyphenation point for the configured language. parley breaks lines
at those points when needed and the hyphens stay invisible
otherwise.
Only English-US is bundled by default — other languages need a
.bincode pattern file built with the hyphenation crate’s
build_dictionaries feature, supplied via dictionary_path.
Fields§
§enabled: bool§language: StringLanguage tag (e.g. "en-us"). The bundled tag is "en-us";
other languages need dictionary_path.
min_word_chars: u8Don’t hyphenate words shorter than this. Defaults to 5.
dictionary_path: Option<String>Optional path to a .bincode hyphenation pattern file (built
from the upstream hyphenation repo). Required when
language isn’t the bundled "en-us".
Trait Implementations§
Source§impl Clone for HyphenationStyle
impl Clone for HyphenationStyle
Source§impl Debug for HyphenationStyle
impl Debug for HyphenationStyle
Source§impl Default for HyphenationStyle
impl Default for HyphenationStyle
Source§impl<'de> Deserialize<'de> for HyphenationStylewhere
HyphenationStyle: Default,
impl<'de> Deserialize<'de> for HyphenationStylewhere
HyphenationStyle: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for HyphenationStyle
impl Freeze for HyphenationStyle
impl Move for HyphenationStyle
impl RefUnwindSafe for HyphenationStyle
impl Send for HyphenationStyle
impl Sync for HyphenationStyle
impl Unpin for HyphenationStyle
impl UnsafeUnpin for HyphenationStyle
impl UnwindSafe for HyphenationStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.