Struct tfm::format::CharDimensions
source · pub struct CharDimensions {
pub width_index: WidthIndex,
pub height_index: u8,
pub depth_index: u8,
pub italic_index: u8,
}
Expand description
Data about one character in a .tfm file.
Fields§
§width_index: WidthIndex
Index of the width of this character in the widths array.
In valid TFM files, this index will always be non-zero. This is because if the width index is zero it means there is no data for the character in the file. In this case the other indices (height, etc.) are necessarily zero. See TFtoPL.2014.? (where blocks of data with a zero width index are skipped) and PLtoTF.2014.? (where missing characters are written with all indices 0).
There is one edge case where this index can be zero. This is if the width index is invalid. In this case tftopl essentially sets the width index to 0.
Note that even if a character doesn’t have dimensions, it can still have a tag.
height_index: u8
Index of the height of this character in the height array.
depth_index: u8
§italic_index: u8
Trait Implementations§
source§impl Clone for CharDimensions
impl Clone for CharDimensions
source§fn clone(&self) -> CharDimensions
fn clone(&self) -> CharDimensions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CharDimensions
impl Debug for CharDimensions
source§impl PartialEq<CharDimensions> for CharDimensions
impl PartialEq<CharDimensions> for CharDimensions
source§fn eq(&self, other: &CharDimensions) -> bool
fn eq(&self, other: &CharDimensions) -> bool
self
and other
values to be equal, and is used
by ==
.