pub trait OtRound<U, T = Self> {
// Required method
fn ot_round(self) -> U;
}Available on crate feature
tables only.Expand description
Floating-point rounding per the OpenType spec.
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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".