martensite-text 0.0.1

HarfBuzz shaping, BiDi, font fallback, and sub-pixel IME projection via cosmic-text.
1
2
3
4
5
6
7
8
9
//! Typography and IME candidate projection.
#![forbid(unsafe_code)]

pub use cosmic_text::{Attrs, Buffer, FontSystem, Metrics, Shaping};
use winit::dpi::{LogicalPosition, LogicalSize};

pub fn compute_ime_bounds(x: f64, y: f64, height: f64) -> (LogicalPosition<f64>, LogicalSize<f64>) {
    (LogicalPosition::new(x, y), LogicalSize::new(2.0, height))
}