Open 12AT7 opened 4 days ago
I am using this workaround:
glyphon::TextArea {
...
scale: 1.0,
...
}
and
let scale_factor = window.scale_factor() as f32;
let metrics = glyphon::Metrics::new(14.0 * scale_factor, 14.0 * scale_factor);
let mut buffer = glyphon::Buffer::new(&mut font_system, metrics);
and this does properly scale the font, and do alignment correctly.
Any help debugging this would be great. scale
was added here before horizontal alignment was available in cosmic-text so there's a good chance there's a bug here somewhere.
OK; I will keep my eyes open on this. In some aspects of Rust, I am still a newbie. Using a debugger is one of those areas where I need to learn more. Maybe this is a good reason to try.
When using alignment such as this:
With configuration like this:
the handling of
scale
seems to be troublesome. On my HiDPI monitor, scale is 2.67. The parameter appears to affect at least two features:Left
works just because it is probably zero * big number.Maybe this is a bug? Or maybe I am missing a parameter somewhere else?