pub struct ScaleF32 {
scale: f32,
}Expand description
Scales font units to floating point pixels, reproducing HarfBuzz’s arithmetic.
Fields§
§scale: f32Implementations§
Trait Implementations§
impl Copy for ScaleF32
Source§impl Scale for ScaleF32
impl Scale for ScaleF32
Source§const NEEDS_UNSCALED: bool = false
const NEEDS_UNSCALED: bool = false
True if the scale keeps a parallel copy of the points in font units,
which hinting needs and which sparse delta interpolation uses as its
reference coordinates.
Source§fn is_scaled(&self) -> bool
fn is_scaled(&self) -> bool
True if a size was supplied. When false the outline comes back in font
units, expressed in
Self::Coord.Source§fn phantom_from_font_units(&self, value: i32) -> f32
fn phantom_from_font_units(&self, value: i32) -> f32
Converts a font unit value into the representation phantom points use
before they are scaled.
Source§fn coord_to_hinting_raw(&self, value: f32) -> i32
fn coord_to_hinting_raw(&self, value: f32) -> i32
Reinterprets an output coordinate as the integer a hinter’s font unit
buffer holds. Read more
Source§fn scale_phantom(&self, point: Point<f32>) -> Point<f32>
fn scale_phantom(&self, point: Point<f32>) -> Point<f32>
Scales a phantom point that still holds font units.
Source§fn add_phantom_delta(&self, point: Point<f32>, delta: Point<f32>) -> Point<f32>
fn add_phantom_delta(&self, point: Point<f32>, delta: Point<f32>) -> Point<f32>
Adds a composite glyph’s phantom point delta.
Source§fn round_phantom(&self, point: Point<f32>) -> Point<f32>
fn round_phantom(&self, point: Point<f32>) -> Point<f32>
Rounds a phantom point, which FreeType does before hinting.
Source§fn load_empty_phantom(
&self,
phantom: &mut [Point<f32>; 4],
deltas: Option<[Point<Fixed>; 4]>,
)
fn load_empty_phantom( &self, phantom: &mut [Point<f32>; 4], deltas: Option<[Point<Fixed>; 4]>, )
Sets the phantom points of a glyph with no outline. Read more
Source§fn load_simple_points(
&self,
pass: SimplePass<'_, '_, Self>,
) -> Result<[Point<f32>; 4], Error>
fn load_simple_points( &self, pass: SimplePass<'_, '_, Self>, ) -> Result<[Point<f32>; 4], Error>
Reads a simple glyph’s points, applies variation deltas, appends the
phantom points and writes the scaled result. Read more
Auto Trait Implementations§
impl Freeze for ScaleF32
impl RefUnwindSafe for ScaleF32
impl Send for ScaleF32
impl Sync for ScaleF32
impl Unpin for ScaleF32
impl UnsafeUnpin for ScaleF32
impl UnwindSafe for ScaleF32
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