When using alignment such as this:
buffer.lines[0].set_align(Some(glyphon::cosmic_text::Align::Center));
With configuration like this:
Some(glyphon::TextArea {
buffer,
left: bounds.location.x,
top: bounds.location.y,
scale: scale_factor,
bounds: glyphon::TextBounds {
top: bounds.location.y as i32,
left: bounds.location.x as i32,
right: (bounds.location.x + bounds.size.width) as i32,
bottom: (bounds.location.y + bounds.size.height) as i32,
},
default_color: glyphon::Color::rgb(255, 255, 255),
custom_glyphs: &[]
})
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:
- Font scaling; this appears to work for me, and I do get reasonable font sizes on HiDPI
- Horizontal alignment; this does not work for me. I think it is positioning the text way, way to the right and off the screen. I think that
Left works just because it is probably zero * big number.
Maybe this is a bug? Or maybe I am missing a parameter somewhere else?
When using alignment such as this:
With configuration like this:
the handling of
scaleseems to be troublesome. On my HiDPI monitor, scale is 2.67. The parameter appears to affect at least two features:Leftworks just because it is probably zero * big number.Maybe this is a bug? Or maybe I am missing a parameter somewhere else?