Skip to main content

FontState

Struct FontState 

Source
pub struct FontState {
    pub font_cx: FontContext,
    pub layout_cx: LayoutContext<()>,
    pub scale_cx: ScaleContext,
    pub atlas: Atlas,
    pub shape_calls: usize,
    /* private fields */
}
Expand description

文字渲染所需全局状态 — parley + swash 版

Fields§

§font_cx: FontContext§layout_cx: LayoutContext<()>§scale_cx: ScaleContext§atlas: Atlas§shape_calls: usize

shaping 执行次数(测试观测缓存命中用)

Auto Trait Implementations§

§

impl !Freeze for FontState

§

impl !RefUnwindSafe for FontState

§

impl !Send for FontState

§

impl !Sync for FontState

§

impl !UnwindSafe for FontState

§

impl Forget for FontState

§

impl Move for FontState

§

impl Unpin for FontState
where Arc<Mutex<SystemFonts>>: Unpin, Arc<FamilyNameMap>: Unpin, Arc<GenericFamilyMap>: Unpin, *const u8 is !null: Unpin, Arc<[u8]>: Unpin, Arc<str>: Unpin, Arc<FamilyInner>: Unpin, *const FamilyId is !null: Unpin, FamilyId: Unpin, Arc<Shared>: Unpin, Arc<dyn AsRef<[u8]> + Sync + Send>: Unpin, *const QueryFont is !null: Unpin, QueryFont: Unpin, Arc<Mutex<Shared>>: Unpin, Align4<u32>: Unpin, Box<LookupInfo>: Unpin, Atomic<u16>: Unpin, Align8<usize>: Unpin, Box<hb_cache_core_t<16, 8, 256, Atomic<u16>>>: Unpin, Atomic<u32>: Unpin, Box<[FontVariation]>: Unpin, *const F2Dot14 is !null: Unpin, F2Dot14: Unpin, u8: Unpin, Box<[Feature]>: Unpin, &'static hb_ot_shaper_t: Unpin, Box<dyn Any + Sync + Send>: Unpin, *const Feature is !null: Unpin, Feature: Unpin, InternalBitFlags: Unpin, Box<HintInstance>: Unpin, Arc<GlyphStyleMap>: Unpin, Arc<RwLock<Vec<Option<UnscaledStyleMetrics>>>>: Unpin, Rc<str>: Unpin, Rc<ShapedLine>: Unpin, Rc<RichShapedLine>: Unpin,

§

impl UnsafeUnpin for FontState
where *const ArcInner<Mutex<SystemFonts>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<SystemFonts>>>: UnsafeUnpin, *const ArcInner<FamilyNameMap> is !null: UnsafeUnpin, PhantomData<ArcInner<FamilyNameMap>>: UnsafeUnpin, *const ArcInner<GenericFamilyMap> is !null: UnsafeUnpin, PhantomData<ArcInner<GenericFamilyMap>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<(Arc<[u8]>, FamilyName)>: UnsafeUnpin, PhantomData<(FamilyId, FamilyName)>: UnsafeUnpin, PhantomData<(FamilyId, Option<FamilyInfo>)>: UnsafeUnpin, *const FamilyId is !null: UnsafeUnpin, PhantomData<FamilyId>: UnsafeUnpin, PhantomData<(Script, PerScript)>: UnsafeUnpin, *const ArcInner<Shared> is !null: UnsafeUnpin, PhantomData<ArcInner<Shared>>: UnsafeUnpin, PhantomData<CachedFamily>: UnsafeUnpin, PhantomData<(SourceId, Entry<Blob<u8>>)>: UnsafeUnpin, *const ArcInner<Mutex<Shared>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<Shared>>>: UnsafeUnpin, PhantomData<(usize, usize)>: UnsafeUnpin, PhantomData<FontVariation>: UnsafeUnpin, PhantomData<FontFeature>: UnsafeUnpin, PhantomData<ResolvedStyle<()>>: UnsafeUnpin, PhantomData<StyleRun>: UnsafeUnpin, PhantomData<LayoutInlineBox>: UnsafeUnpin, PhantomData<BidiLevel>: UnsafeUnpin, PhantomData<BidiClass>: UnsafeUnpin, PhantomData<(usize, char, BidiMirroringGlyph)>: UnsafeUnpin, PhantomData<Run>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<CharInfo>: UnsafeUnpin, PhantomData<(Range<usize>, LineBreakConfig)>: UnsafeUnpin, PhantomData<Range<usize>>: UnsafeUnpin, PhantomData<RangedProperty<()>>: UnsafeUnpin, PhantomData<RangedStyle<()>>: UnsafeUnpin, PhantomData<StyleTreeNode<()>>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<u16>: UnsafeUnpin, PhantomData<Entry<ShapeDataKey, ShaperData>>: UnsafeUnpin, PhantomData<Entry<ShapeInstanceId, ShaperInstance>>: UnsafeUnpin, PhantomData<Entry<ShapePlanId, hb_ot_shape_plan_t>>: UnsafeUnpin, InternalBitFlags: UnsafeUnpin, PhantomData<GlyphInfo>: UnsafeUnpin, PhantomData<GlyphPosition>: UnsafeUnpin, PhantomData<BitPage>: UnsafeUnpin, PhantomData<PageInfo>: UnsafeUnpin, Align8<usize>: UnsafeUnpin, PhantomData<Feature>: UnsafeUnpin, PhantomData<Char>: UnsafeUnpin, PhantomData<Entry<ScalerProxy>>: UnsafeUnpin, PhantomData<LayerData>: UnsafeUnpin, PhantomData<Vector>: UnsafeUnpin, PhantomData<Verb>: UnsafeUnpin, PhantomData<Segment>: UnsafeUnpin, PhantomData<Cell>: UnsafeUnpin, PhantomData<i32>: UnsafeUnpin, PhantomData<HintingEntry>: UnsafeUnpin, PhantomData<F2Dot14>: UnsafeUnpin, PhantomData<(GlyphKey, AtlasEntry)>: UnsafeUnpin, PhantomData<(GlyphKey, RasterGlyph)>: UnsafeUnpin, PhantomData<((TextKey, u32, Option<u32>, u64, u32), LineCacheEntry)>: UnsafeUnpin, PhantomData<(RichCacheKey, RichCacheEntry)>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>