Struct style::properties::style_structs::Font [] [src]

pub struct Font {
    pub font_family: T,
    pub font_style: T,
    pub font_variant_caps: T,
    pub font_weight: T,
    pub font_size: T,
    pub font_stretch: T,
    pub hash: u64,
}

The Font style struct.

Fields

The font-family computed value.

The font-style computed value.

The font-variant-caps computed value.

The font-weight computed value.

The font-size computed value.

The font-stretch computed value.

The font hash, used for font caching.

Methods

impl Font
[src]

[src]

Set font-family.

[src]

Set font-family from other struct.

[src]

Reset font-family from the initial struct.

[src]

Get the computed value for font-family.

[src]

Set font-style.

[src]

Set font-style from other struct.

[src]

Reset font-style from the initial struct.

[src]

Get the computed value for font-style.

[src]

Set font-variant-caps.

[src]

Set font-variant-caps from other struct.

[src]

Reset font-variant-caps from the initial struct.

[src]

Get the computed value for font-variant-caps.

[src]

Set font-weight.

[src]

Set font-weight from other struct.

[src]

Reset font-weight from the initial struct.

[src]

Get the computed value for font-weight.

[src]

Set font-size.

[src]

Set font-size from other struct.

[src]

Reset font-size from the initial struct.

[src]

Get the computed value for font-size.

[src]

Set font-stretch.

[src]

Set font-stretch from other struct.

[src]

Reset font-stretch from the initial struct.

[src]

Get the computed value for font-stretch.

[src]

Computes a font hash in order to be able to cache fonts effectively in GFX and layout.

[src]

(Servo does not handle MathML, so this just calls copy_font_size_from)

[src]

(Servo does not handle MathML, so this just calls set_font_size)

[src]

(Servo does not handle MathML, so this does nothing)

Trait Implementations

impl Clone for Font
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Font
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for Font
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

impl PartialEq for Font
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.