Skip to main content

Shape

Enum Shape 

Source
pub enum Shape {
    Wordmark,
    Text(&'static [&'static str]),
    Disc,
    Knockout {
        lines: &'static [&'static str],
        glyph: f32,
    },
}
Expand description

What shape the field pulls the lattice towards.

A size ladder rather than a set of alternatives: the wordmark is the logo, the knockout is the icon, and the disc is what is left when a tile is sixteen pixels across. Shape::Text sets the font for whatever a knockout cuts.

Variants§

§

Wordmark

The “did.bot” wordmark, laid out the way the landing page lays it out — hung off its own “.” rather than centred — rather than as text this crate composed.

§

Text(&'static [&'static str])

Lines of the same six-glyph font, centred as a lockup. No mark ships as one today; it is what Shape::Knockout cuts with, and what a second line would be set in if the icons ever wanted one.

§

Disc

A filled disc. Letterforms do not survive this anneal below about three lattice sites to the glyph pixel — surface tension closes a two-site counter, and a “d” comes out a blob — so the smallest tile gets the one shape a lattice this coarse can still hold, and the one the dynamics actively help: a single ordered domain, which is also the “.” in did.bot.

§

Knockout

A disc with lines cut out of it: the letterform is the ground showing through, not the ink.

This is what every icon above the dot is. A letter set positively at 32 sites is a stroke of ink two or three sites wide with noise on both flanks; cut out of a disc instead, both its flanks are one large ordered domain, which is far more stable — the shape is carried by an edge rather than by a thin ribbon. The counter still has to be a hole several sites across, which is why glyph is well under Mark::fill rather than filling it.

Fields

§lines: &'static [&'static str]

The lines to cut, in this crate’s own six-glyph font.

§glyph: f32

How much of the tile the letterform spans, as a fraction.

Trait Implementations§

Source§

impl Clone for Shape

Source§

fn clone(&self) -> Shape

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Shape

Auto Trait Implementations§

§

impl Freeze for Shape

§

impl RefUnwindSafe for Shape

§

impl Send for Shape

§

impl Sync for Shape

§

impl Unpin for Shape

§

impl UnsafeUnpin for Shape

§

impl UnwindSafe for Shape

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.