stbtt_ScaleForMappingEmToPixels function
- @Native<Float Function(Pointer<
stbtt_fontinfo> , Float)>(ffi.Pointer<stbtt_fontinfo>, ffi.Float)>()
- Pointer<
stbtt_fontinfo> info, - double pixels
computes a scale factor to produce a font whose "height" is 'pixels' tall. Height is measured as the distance from the highest ascender to the lowest descender; in other words, it's equivalent to calling stbtt_GetFontVMetrics and computing: scale = pixels / (ascent - descent) so if you prefer to measure height by the ascent only, use a similar calculation.
Implementation
@ffi.Native<ffi.Float Function(ffi.Pointer<stbtt_fontinfo>, ffi.Float)>()
external double stbtt_ScaleForMappingEmToPixels(
ffi.Pointer<stbtt_fontinfo> info,
double pixels,
);