Struct zng_ext_font::TextOverflowInfo
source · pub struct TextOverflowInfo {
pub line: usize,
pub text_char: usize,
pub included_glyphs: SmallVec<[Range<usize>; 1]>,
pub suffix_origin: Point2D<f32, Px>,
}
Expand description
Info about a shaped text overflow in constraint.
Can be computed using ShapedText::overflow_info
.
Fields§
§line: usize
First overflow line.
All segments in this line and next lines are fully overflown. The previous line may be partially overflown, the lines before that are fully visible.
Is the ShapedText::lines_len
if the last line is fully visible.
text_char: usize
First overflow character in the text.
Note that if overflow is not wrapping (single text line) the char may not cover all visible glyphs in the line if it is bidirectional.
included_glyphs: SmallVec<[Range<usize>; 1]>
Glyphs not overflown in the last not overflown line.
If the line is not bidirectional this will be a single range covering the not overflow glyphs, if it is bidi multiple ranges are possible due to bidi reordering.
suffix_origin: Point2D<f32, Px>
Placement of the suffix (ellipses or custom).
The suffix must be of the width given to ShapedText::overflow_info
and the same line height
as the text.
Trait Implementations§
source§impl Clone for TextOverflowInfo
impl Clone for TextOverflowInfo
source§fn clone(&self) -> TextOverflowInfo
fn clone(&self) -> TextOverflowInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TextOverflowInfo
impl Debug for TextOverflowInfo
source§impl<'de> Deserialize<'de> for TextOverflowInfo
impl<'de> Deserialize<'de> for TextOverflowInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for TextOverflowInfo
impl PartialEq for TextOverflowInfo
source§impl Serialize for TextOverflowInfo
impl Serialize for TextOverflowInfo
impl StructuralPartialEq for TextOverflowInfo
Auto Trait Implementations§
impl Freeze for TextOverflowInfo
impl RefUnwindSafe for TextOverflowInfo
impl Send for TextOverflowInfo
impl Sync for TextOverflowInfo
impl Unpin for TextOverflowInfo
impl UnwindSafe for TextOverflowInfo
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more