pub struct StyleSheet {
pub styles: Vec<Option<StyleDef>>,
pub ftc_standard: [Option<u16>; 3],
}Fields§
§styles: Vec<Option<StyleDef>>§ftc_standard: [Option<u16>; 3]Default fonts (ftc ascii / FE / other) for the document, from STSHI.
Implementations§
Source§impl StyleSheet
impl StyleSheet
pub fn empty() -> StyleSheet
pub fn parse(stsh: &[u8]) -> StyleSheet
pub fn style(&self, istd: u16) -> Option<&StyleDef>
pub fn style_id(&self, istd: u16) -> Option<String>
pub fn toggles(&self, istd: u16) -> ToggleSet
Sourcepub fn run_toggle_base(
&self,
para_istd: u16,
char_istd: Option<u16>,
) -> ToggleSet
pub fn run_toggle_base( &self, para_istd: u16, char_istd: Option<u16>, ) -> ToggleSet
Toggle operands refer to the current character style, or to the paragraph style when no character style is applied.
Sourcepub fn to_styles_xml(&self, fonts: &FontTable, default_hps: u16) -> String
pub fn to_styles_xml(&self, fonts: &FontTable, default_hps: u16) -> String
Synthesizes word/styles.xml.
Auto Trait Implementations§
impl Freeze for StyleSheet
impl RefUnwindSafe for StyleSheet
impl Send for StyleSheet
impl Sync for StyleSheet
impl Unpin for StyleSheet
impl UnsafeUnpin for StyleSheet
impl UnwindSafe for StyleSheet
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more