Struct solstice_glyph::ab_glyph::GlyphId [−]
Glyph id.
Example
use ab_glyph::{FontRef, Font, GlyphId}; let font = FontRef::try_from_slice(include_bytes!("../../dev/fonts/Exo2-Light.otf"))?; let q_id: GlyphId = font.glyph_id('q');
Implementations
impl GlyphId
pub fn with_scale_and_position<S, P>(self, scale: S, position: P) -> Glyph where
S: Into<PxScale>,
P: Into<Point>,
S: Into<PxScale>,
P: Into<Point>,
Construct a Glyph
with given scale & position.
Example
let glyph = font.glyph_id('z').with_scale_and_position(24.0, point(100.0, 0.0));
pub fn with_scale<S>(self, scale: S) -> Glyph where
S: Into<PxScale>,
S: Into<PxScale>,
Construct a Glyph
with given scale and position point(0.0, 0.0)
.
Example
let glyph = font.glyph_id('w').with_scale(48.0);
Trait Implementations
impl Clone for GlyphId
pub fn clone(&self) -> GlyphId
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GlyphId
impl Debug for GlyphId
impl Default for GlyphId
impl Eq for GlyphId
impl Hash for GlyphId
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for GlyphId
pub fn cmp(&self, other: &GlyphId) -> Ordering
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<GlyphId> for GlyphId
impl PartialOrd<GlyphId> for GlyphId
pub fn partial_cmp(&self, other: &GlyphId) -> Option<Ordering>
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for GlyphId
impl StructuralPartialEq for GlyphId
Auto Trait Implementations
impl RefUnwindSafe for GlyphId
impl Send for GlyphId
impl Sync for GlyphId
impl Unpin for GlyphId
impl UnwindSafe for GlyphId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,