pub struct CharacterGeometry {
pub position: f32,
pub width: f32,
}Expand description
Per-character advance geometry for a laid-out text run.
Consumed by accessibility layers that need to populate AccessKit’s
character_positions and character_widths on a Role::TextRun
node so screen reader highlight cursors and screen magnifiers can
track the caret at character granularity.
position is measured in run-local coordinates: the first
character of the requested range sits at position == 0.0, and
subsequent characters accumulate their advance widths. width is
the advance width of each character, in the same units.
Fields§
§position: f32§width: f32Trait Implementations§
Source§impl Clone for CharacterGeometry
impl Clone for CharacterGeometry
Source§fn clone(&self) -> CharacterGeometry
fn clone(&self) -> CharacterGeometry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CharacterGeometry
impl Debug for CharacterGeometry
Source§impl PartialEq for CharacterGeometry
impl PartialEq for CharacterGeometry
impl Copy for CharacterGeometry
impl StructuralPartialEq for CharacterGeometry
Auto Trait Implementations§
impl Freeze for CharacterGeometry
impl RefUnwindSafe for CharacterGeometry
impl Send for CharacterGeometry
impl Sync for CharacterGeometry
impl Unpin for CharacterGeometry
impl UnsafeUnpin for CharacterGeometry
impl UnwindSafe for CharacterGeometry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more