Introduce text::Shaping enum and replace magic boolean
This commit is contained in:
parent
33b5a90019
commit
4bd290afe7
25 changed files with 203 additions and 132 deletions
|
|
@ -10,6 +10,7 @@ pub use mesh::Mesh;
|
|||
pub use quad::Quad;
|
||||
pub use text::Text;
|
||||
|
||||
use crate::core;
|
||||
use crate::core::alignment;
|
||||
use crate::core::{Background, Color, Font, Point, Rectangle, Size, Vector};
|
||||
use crate::graphics::{Primitive, Viewport};
|
||||
|
|
@ -64,7 +65,7 @@ impl<'a> Layer<'a> {
|
|||
font: Font::MONOSPACE,
|
||||
horizontal_alignment: alignment::Horizontal::Left,
|
||||
vertical_alignment: alignment::Vertical::Top,
|
||||
advanced_shape: false,
|
||||
shaping: core::text::Shaping::Basic,
|
||||
};
|
||||
|
||||
overlay.text.push(text);
|
||||
|
|
@ -117,7 +118,7 @@ impl<'a> Layer<'a> {
|
|||
font,
|
||||
horizontal_alignment,
|
||||
vertical_alignment,
|
||||
advanced_shape,
|
||||
shaping,
|
||||
} => {
|
||||
let layer = &mut layers[current_layer];
|
||||
|
||||
|
|
@ -129,7 +130,7 @@ impl<'a> Layer<'a> {
|
|||
font: *font,
|
||||
horizontal_alignment: *horizontal_alignment,
|
||||
vertical_alignment: *vertical_alignment,
|
||||
advanced_shape: *advanced_shape,
|
||||
shaping: *shaping,
|
||||
});
|
||||
}
|
||||
Primitive::Quad {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue