Trait write_fonts::OtRound

source ·
pub trait OtRound<U, T = Self> {
    // Required method
    fn ot_round(self) -> U;
}
Expand description

ot_round is defined by https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#coordinate-scales-and-normalization.

https://github.com/fonttools/fonttools/issues/1248#issuecomment-383198166 captures the rationale for the current implementation.

Copied from https://github.com/simoncozens/rust-font-tools/blob/105436d3a617ddbebd25f790b041ff506bd90d44/otmath/src/lib.rs#L17, which is in turn copied from https://github.com/fonttools/fonttools/blob/a55a545b12a9735e303568a9d4c7e75fe6dbd2be/Lib/fontTools/misc/roundTools.py#L23.

Required Methods§

source

fn ot_round(self) -> U

Implementations on Foreign Types§

source§

impl OtRound<i16, f32> for f32

source§

fn ot_round(self) -> i16

source§

impl OtRound<i16, f64> for f64

source§

fn ot_round(self) -> i16

source§

impl OtRound<u16, f64> for f64

source§

fn ot_round(self) -> u16

source§

impl OtRound<u16, f32> for f32

source§

fn ot_round(self) -> u16

Implementors§