pub struct CUFProperties { /* private fields */ }Expand description
Font properties controlling text layout and rendering.
Many of these properties are indices or references whose exact purpose is still being researched. Comments from the Europa Barbarorum Team’s research have been preserved for reference.
Implementations§
Source§impl CUFProperties
impl CUFProperties
Sourcepub fn first_prop(&self) -> &u16
pub fn first_prop(&self) -> &u16
Unknown purpose (first CUF property).
Sourcepub fn second_prop(&self) -> &u16
pub fn second_prop(&self) -> &u16
Unknown purpose. Second CUF property.
Sourcepub fn line_height(&self) -> &u16
pub fn line_height(&self) -> &u16
Index of the value which appears to have something to do with line height. Underscore line? Base line?
Sourcepub fn fourth_prop(&self) -> &u16
pub fn fourth_prop(&self) -> &u16
Unknown purpose. Fourth CUF property.
Sourcepub fn fifth_prop(&self) -> &u16
pub fn fifth_prop(&self) -> &u16
Unknown purpose. Fifth CUF property.
Sourcepub fn baseline(&self) -> &u16
pub fn baseline(&self) -> &u16
Index of the value which appears to correspond to a ‘baseline’ of sorts in the CUF file format.
Sourcepub fn layout_y_offset(&self) -> &u16
pub fn layout_y_offset(&self) -> &u16
Index of the value which determines y-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn space_justify(&self) -> &u16
pub fn space_justify(&self) -> &u16
Used to specify how wide a space is for justification and text wrapping calculations.
Sourcepub fn layout_x_offset(&self) -> &u16
pub fn layout_x_offset(&self) -> &u16
Index of the value which determines x-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn h_size(&self) -> &u16
pub fn h_size(&self) -> &u16
Index of the value which determines a maximum width for glyphs. Glyphs which are wider than the maximum specified for this property will appear cut-off.
There appears to be no effect on the position of a glyph after a glyph of which the advance is larger than the value specified for this setting.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Sourcepub fn v_size(&self) -> &u16
pub fn v_size(&self) -> &u16
Index of the value which determines a maximum height for glyphs. The corresponding value probably should include leading. Glyphs which are taller than the maximum specified for this property will appear cut-off.
Too small values for this property may result in crashes or unspecified errors on exit in M2TW.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Source§impl CUFProperties
impl CUFProperties
Sourcepub fn first_prop_mut(&mut self) -> &mut u16
pub fn first_prop_mut(&mut self) -> &mut u16
Unknown purpose (first CUF property).
Sourcepub fn second_prop_mut(&mut self) -> &mut u16
pub fn second_prop_mut(&mut self) -> &mut u16
Unknown purpose. Second CUF property.
Sourcepub fn line_height_mut(&mut self) -> &mut u16
pub fn line_height_mut(&mut self) -> &mut u16
Index of the value which appears to have something to do with line height. Underscore line? Base line?
Sourcepub fn fourth_prop_mut(&mut self) -> &mut u16
pub fn fourth_prop_mut(&mut self) -> &mut u16
Unknown purpose. Fourth CUF property.
Sourcepub fn fifth_prop_mut(&mut self) -> &mut u16
pub fn fifth_prop_mut(&mut self) -> &mut u16
Unknown purpose. Fifth CUF property.
Sourcepub fn baseline_mut(&mut self) -> &mut u16
pub fn baseline_mut(&mut self) -> &mut u16
Index of the value which appears to correspond to a ‘baseline’ of sorts in the CUF file format.
Sourcepub fn layout_y_offset_mut(&mut self) -> &mut u16
pub fn layout_y_offset_mut(&mut self) -> &mut u16
Index of the value which determines y-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn space_justify_mut(&mut self) -> &mut u16
pub fn space_justify_mut(&mut self) -> &mut u16
Used to specify how wide a space is for justification and text wrapping calculations.
Sourcepub fn layout_x_offset_mut(&mut self) -> &mut u16
pub fn layout_x_offset_mut(&mut self) -> &mut u16
Index of the value which determines x-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn h_size_mut(&mut self) -> &mut u16
pub fn h_size_mut(&mut self) -> &mut u16
Index of the value which determines a maximum width for glyphs. Glyphs which are wider than the maximum specified for this property will appear cut-off.
There appears to be no effect on the position of a glyph after a glyph of which the advance is larger than the value specified for this setting.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Sourcepub fn v_size_mut(&mut self) -> &mut u16
pub fn v_size_mut(&mut self) -> &mut u16
Index of the value which determines a maximum height for glyphs. The corresponding value probably should include leading. Glyphs which are taller than the maximum specified for this property will appear cut-off.
Too small values for this property may result in crashes or unspecified errors on exit in M2TW.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Source§impl CUFProperties
impl CUFProperties
Sourcepub fn set_first_prop(&mut self, val: u16) -> &mut Self
pub fn set_first_prop(&mut self, val: u16) -> &mut Self
Unknown purpose (first CUF property).
Sourcepub fn set_second_prop(&mut self, val: u16) -> &mut Self
pub fn set_second_prop(&mut self, val: u16) -> &mut Self
Unknown purpose. Second CUF property.
Sourcepub fn set_line_height(&mut self, val: u16) -> &mut Self
pub fn set_line_height(&mut self, val: u16) -> &mut Self
Index of the value which appears to have something to do with line height. Underscore line? Base line?
Sourcepub fn set_fourth_prop(&mut self, val: u16) -> &mut Self
pub fn set_fourth_prop(&mut self, val: u16) -> &mut Self
Unknown purpose. Fourth CUF property.
Sourcepub fn set_fifth_prop(&mut self, val: u16) -> &mut Self
pub fn set_fifth_prop(&mut self, val: u16) -> &mut Self
Unknown purpose. Fifth CUF property.
Sourcepub fn set_baseline(&mut self, val: u16) -> &mut Self
pub fn set_baseline(&mut self, val: u16) -> &mut Self
Index of the value which appears to correspond to a ‘baseline’ of sorts in the CUF file format.
Sourcepub fn set_layout_y_offset(&mut self, val: u16) -> &mut Self
pub fn set_layout_y_offset(&mut self, val: u16) -> &mut Self
Index of the value which determines y-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn set_space_justify(&mut self, val: u16) -> &mut Self
pub fn set_space_justify(&mut self, val: u16) -> &mut Self
Used to specify how wide a space is for justification and text wrapping calculations.
Sourcepub fn set_layout_x_offset(&mut self, val: u16) -> &mut Self
pub fn set_layout_x_offset(&mut self, val: u16) -> &mut Self
Index of the value which determines x-offset w.r.t. the bounding box of a string of text in this font.
Sourcepub fn set_h_size(&mut self, val: u16) -> &mut Self
pub fn set_h_size(&mut self, val: u16) -> &mut Self
Index of the value which determines a maximum width for glyphs. Glyphs which are wider than the maximum specified for this property will appear cut-off.
There appears to be no effect on the position of a glyph after a glyph of which the advance is larger than the value specified for this setting.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Sourcepub fn set_v_size(&mut self, val: u16) -> &mut Self
pub fn set_v_size(&mut self, val: u16) -> &mut Self
Index of the value which determines a maximum height for glyphs. The corresponding value probably should include leading. Glyphs which are taller than the maximum specified for this property will appear cut-off.
Too small values for this property may result in crashes or unspecified errors on exit in M2TW.
Note that individual glyphs contain sufficient information to calculate a much more optimal bounding box than by simply using multiples of the value corresponding to this index.
Trait Implementations§
Source§impl Clone for CUFProperties
impl Clone for CUFProperties
Source§fn clone(&self) -> CUFProperties
fn clone(&self) -> CUFProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CUFProperties
impl Debug for CUFProperties
Source§impl Default for CUFProperties
impl Default for CUFProperties
Source§fn default() -> CUFProperties
fn default() -> CUFProperties
Source§impl<'de> Deserialize<'de> for CUFProperties
impl<'de> Deserialize<'de> for CUFProperties
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>,
Source§impl PartialEq for CUFProperties
impl PartialEq for CUFProperties
Source§impl Serialize for CUFProperties
impl Serialize for CUFProperties
impl StructuralPartialEq for CUFProperties
Auto Trait Implementations§
impl Freeze for CUFProperties
impl RefUnwindSafe for CUFProperties
impl Send for CUFProperties
impl Sync for CUFProperties
impl Unpin for CUFProperties
impl UnsafeUnpin for CUFProperties
impl UnwindSafe for CUFProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.