Skip to main content

MathConstants

Struct MathConstants 

Source
pub struct MathConstants {
Show 56 fields pub script_percent_scale_down: i16, pub script_script_percent_scale_down: i16, pub delimited_sub_formula_min_height: UfWord, pub display_operator_min_height: UfWord, pub math_leading: MathValueRecord, pub axis_height: MathValueRecord, pub accent_base_height: MathValueRecord, pub flattened_accent_base_height: MathValueRecord, pub subscript_shift_down: MathValueRecord, pub subscript_top_max: MathValueRecord, pub subscript_baseline_drop_min: MathValueRecord, pub superscript_shift_up: MathValueRecord, pub superscript_shift_up_cramped: MathValueRecord, pub superscript_bottom_min: MathValueRecord, pub superscript_baseline_drop_max: MathValueRecord, pub sub_superscript_gap_min: MathValueRecord, pub superscript_bottom_max_with_subscript: MathValueRecord, pub space_after_script: MathValueRecord, pub upper_limit_gap_min: MathValueRecord, pub upper_limit_baseline_rise_min: MathValueRecord, pub lower_limit_gap_min: MathValueRecord, pub lower_limit_baseline_drop_min: MathValueRecord, pub stack_top_shift_up: MathValueRecord, pub stack_top_display_style_shift_up: MathValueRecord, pub stack_bottom_shift_down: MathValueRecord, pub stack_bottom_display_style_shift_down: MathValueRecord, pub stack_gap_min: MathValueRecord, pub stack_display_style_gap_min: MathValueRecord, pub stretch_stack_top_shift_up: MathValueRecord, pub stretch_stack_bottom_shift_down: MathValueRecord, pub stretch_stack_gap_above_min: MathValueRecord, pub stretch_stack_gap_below_min: MathValueRecord, pub fraction_numerator_shift_up: MathValueRecord, pub fraction_numerator_display_style_shift_up: MathValueRecord, pub fraction_denominator_shift_down: MathValueRecord, pub fraction_denominator_display_style_shift_down: MathValueRecord, pub fraction_numerator_gap_min: MathValueRecord, pub fraction_num_display_style_gap_min: MathValueRecord, pub fraction_rule_thickness: MathValueRecord, pub fraction_denominator_gap_min: MathValueRecord, pub fraction_denom_display_style_gap_min: MathValueRecord, pub skewed_fraction_horizontal_gap: MathValueRecord, pub skewed_fraction_vertical_gap: MathValueRecord, pub overbar_vertical_gap: MathValueRecord, pub overbar_rule_thickness: MathValueRecord, pub overbar_extra_ascender: MathValueRecord, pub underbar_vertical_gap: MathValueRecord, pub underbar_rule_thickness: MathValueRecord, pub underbar_extra_descender: MathValueRecord, pub radical_vertical_gap: MathValueRecord, pub radical_display_style_vertical_gap: MathValueRecord, pub radical_rule_thickness: MathValueRecord, pub radical_extra_ascender: MathValueRecord, pub radical_kern_before_degree: MathValueRecord, pub radical_kern_after_degree: MathValueRecord, pub radical_degree_bottom_raise_percent: i16,
}
Available on crate feature tables only.
Expand description

Fields§

§script_percent_scale_down: i16

Percentage of scaling down for level 1 superscripts and subscripts.

§script_script_percent_scale_down: i16

Percentage of scaling down for level 2 (scriptScript) superscripts and subscripts.

§delimited_sub_formula_min_height: UfWord

Minimum height required for a delimited expression (contained within parentheses, etc.) to be treated as a sub-formula.

§display_operator_min_height: UfWord

Minimum height of n-ary operators (such as integral and summation) for formulas in display mode (that is, appearing as standalone page elements, not embedded inline within text).

§math_leading: MathValueRecord

White space to be left between math formulas to ensure proper line spacing.

§axis_height: MathValueRecord

Axis height of the font.

§accent_base_height: MathValueRecord

Maximum (ink) height of accent base that does not require raising the accents.

§flattened_accent_base_height: MathValueRecord

Maximum (ink) height of accent base that does not require flattening the accents.

§subscript_shift_down: MathValueRecord

The standard shift down applied to subscript elements.

§subscript_top_max: MathValueRecord

Maximum allowed height of the (ink) top of subscripts that does not require moving subscripts further down.

§subscript_baseline_drop_min: MathValueRecord

Minimum allowed drop of the baseline of subscripts relative to the (ink) bottom of the base.

§superscript_shift_up: MathValueRecord

Standard shift up applied to superscript elements.

§superscript_shift_up_cramped: MathValueRecord

Standard shift of superscripts relative to the base, in cramped style.

§superscript_bottom_min: MathValueRecord

Minimum allowed height of the (ink) bottom of superscripts that does not require moving subscripts further up.

§superscript_baseline_drop_max: MathValueRecord

Maximum allowed drop of the baseline of superscripts relative to the (ink) top of the base.

§sub_superscript_gap_min: MathValueRecord

Minimum gap between the superscript and subscript ink.

§superscript_bottom_max_with_subscript: MathValueRecord

The maximum level to which the (ink) bottom of superscript can be pushed to increase the gap between superscript and subscript, before subscript starts being moved down.

§space_after_script: MathValueRecord

Extra white space to be added after each subscript and superscript.

§upper_limit_gap_min: MathValueRecord

Minimum gap between the (ink) bottom of the upper limit, and the (ink) top of the base operator.

§upper_limit_baseline_rise_min: MathValueRecord

Minimum distance between baseline of upper limit and (ink) top of the base operator.

§lower_limit_gap_min: MathValueRecord

Minimum gap between (ink) top of the lower limit, and (ink) bottom of the base operator.

§lower_limit_baseline_drop_min: MathValueRecord

Minimum distance between baseline of the lower limit and (ink) bottom of the base operator.

§stack_top_shift_up: MathValueRecord

Standard shift up applied to the top element of a stack.

§stack_top_display_style_shift_up: MathValueRecord

Standard shift up applied to the top element of a stack in display style.

§stack_bottom_shift_down: MathValueRecord

Standard shift down applied to the bottom element of a stack.

§stack_bottom_display_style_shift_down: MathValueRecord

Standard shift down applied to the bottom element of a stack in display style.

§stack_gap_min: MathValueRecord

Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element.

§stack_display_style_gap_min: MathValueRecord

Minimum gap between (ink) bottom of the top element of a stack, and the (ink) top of the bottom element in display style.

§stretch_stack_top_shift_up: MathValueRecord

Standard shift up applied to the top element of the stretch stack.

§stretch_stack_bottom_shift_down: MathValueRecord

Standard shift down applied to the bottom element of the stretch stack.

§stretch_stack_gap_above_min: MathValueRecord

Minimum gap between the ink of the stretched element, and the (ink) bottom of the element above.

§stretch_stack_gap_below_min: MathValueRecord

Minimum gap between the ink of the stretched element, and the (ink) top of the element below.

§fraction_numerator_shift_up: MathValueRecord

Standard shift up applied to the numerator.

§fraction_numerator_display_style_shift_up: MathValueRecord

Standard shift up applied to the numerator in display style.

§fraction_denominator_shift_down: MathValueRecord

Standard shift down applied to the denominator.

§fraction_denominator_display_style_shift_down: MathValueRecord

Standard shift down applied to the denominator in display style.

§fraction_numerator_gap_min: MathValueRecord

Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar.

§fraction_num_display_style_gap_min: MathValueRecord

Minimum tolerated gap between the (ink) bottom of the numerator and the ink of the fraction bar in display style.

§fraction_rule_thickness: MathValueRecord

Thickness of the fraction bar.

§fraction_denominator_gap_min: MathValueRecord

Minimum tolerated gap between the ink of the fraction bar and the (ink) top of the denominator.

§fraction_denom_display_style_gap_min: MathValueRecord

Minimum tolerated gap between the ink of the fraction bar and the (ink) top of the denominator in display style.

§skewed_fraction_horizontal_gap: MathValueRecord

Horizontal distance between the top and bottom elements of a skewed fraction.

§skewed_fraction_vertical_gap: MathValueRecord

Vertical distance between the ink of the top and bottom elements of a skewed fraction.

§overbar_vertical_gap: MathValueRecord

Distance between the overbar and the (ink) top of he base.

§overbar_rule_thickness: MathValueRecord

Thickness of overbar.

§overbar_extra_ascender: MathValueRecord

Extra white space reserved above the overbar.

§underbar_vertical_gap: MathValueRecord

Distance between underbar and (ink) bottom of the base.

§underbar_rule_thickness: MathValueRecord

Thickness of underbar.

§underbar_extra_descender: MathValueRecord

Extra white space reserved below the underbar.

§radical_vertical_gap: MathValueRecord

Space between the (ink) top of the expression and the bar over it.

§radical_display_style_vertical_gap: MathValueRecord

Space between the (ink) top of the expression and the bar over it in display style.

§radical_rule_thickness: MathValueRecord

Thickness of the radical rule.

§radical_extra_ascender: MathValueRecord

Extra white space reserved above the radical.

§radical_kern_before_degree: MathValueRecord

Extra horizontal kern before the degree of a radical, if such is present.

§radical_kern_after_degree: MathValueRecord

Negative kern after the degree of a radical, if such is present.

§radical_degree_bottom_raise_percent: i16

Height of the bottom of the radical degree, if such is present, in proportion to the ascender of the radical sign.

Implementations§

Source§

impl MathConstants

Source

pub fn new( script_percent_scale_down: i16, script_script_percent_scale_down: i16, delimited_sub_formula_min_height: UfWord, display_operator_min_height: UfWord, math_leading: MathValueRecord, axis_height: MathValueRecord, accent_base_height: MathValueRecord, flattened_accent_base_height: MathValueRecord, subscript_shift_down: MathValueRecord, subscript_top_max: MathValueRecord, subscript_baseline_drop_min: MathValueRecord, superscript_shift_up: MathValueRecord, superscript_shift_up_cramped: MathValueRecord, superscript_bottom_min: MathValueRecord, superscript_baseline_drop_max: MathValueRecord, sub_superscript_gap_min: MathValueRecord, superscript_bottom_max_with_subscript: MathValueRecord, space_after_script: MathValueRecord, upper_limit_gap_min: MathValueRecord, upper_limit_baseline_rise_min: MathValueRecord, lower_limit_gap_min: MathValueRecord, lower_limit_baseline_drop_min: MathValueRecord, stack_top_shift_up: MathValueRecord, stack_top_display_style_shift_up: MathValueRecord, stack_bottom_shift_down: MathValueRecord, stack_bottom_display_style_shift_down: MathValueRecord, stack_gap_min: MathValueRecord, stack_display_style_gap_min: MathValueRecord, stretch_stack_top_shift_up: MathValueRecord, stretch_stack_bottom_shift_down: MathValueRecord, stretch_stack_gap_above_min: MathValueRecord, stretch_stack_gap_below_min: MathValueRecord, fraction_numerator_shift_up: MathValueRecord, fraction_numerator_display_style_shift_up: MathValueRecord, fraction_denominator_shift_down: MathValueRecord, fraction_denominator_display_style_shift_down: MathValueRecord, fraction_numerator_gap_min: MathValueRecord, fraction_num_display_style_gap_min: MathValueRecord, fraction_rule_thickness: MathValueRecord, fraction_denominator_gap_min: MathValueRecord, fraction_denom_display_style_gap_min: MathValueRecord, skewed_fraction_horizontal_gap: MathValueRecord, skewed_fraction_vertical_gap: MathValueRecord, overbar_vertical_gap: MathValueRecord, overbar_rule_thickness: MathValueRecord, overbar_extra_ascender: MathValueRecord, underbar_vertical_gap: MathValueRecord, underbar_rule_thickness: MathValueRecord, underbar_extra_descender: MathValueRecord, radical_vertical_gap: MathValueRecord, radical_display_style_vertical_gap: MathValueRecord, radical_rule_thickness: MathValueRecord, radical_extra_ascender: MathValueRecord, radical_kern_before_degree: MathValueRecord, radical_kern_after_degree: MathValueRecord, radical_degree_bottom_raise_percent: i16, ) -> Self

Construct a new MathConstants

Trait Implementations§

Source§

impl Clone for MathConstants

Source§

fn clone(&self) -> Self

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 Debug for MathConstants

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MathConstants

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MathConstants

Available on crate feature serde only.
Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for MathConstants

Source§

impl<'a> FontRead<'a> for MathConstants

Source§

fn read_with_args(data: FontData<'a>, _: ()) -> Result<Self, ReadError>

Read an item, performing validation. Read more
Source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>
where Self: FontRead<'a, Args = ()>,

Read an instance of Self from the provided data, performing validation. Read more
Source§

impl FontWrite for MathConstants

Source§

fn write_into(&self, writer: &mut TableWriter)

Write our data and information about offsets into this TableWriter.
Source§

fn table_type(&self) -> TableType

The type of this table. Read more
Source§

impl<'a> FromObjRef<MathConstants<'a>> for MathConstants

Source§

fn from_obj_ref(obj: &MathConstants<'a>, _: FontData<'_>) -> Self

Convert from to an instance of Self, using the provided data to resolve offsets.
Source§

impl<'a> FromTableRef<MathConstants<'a>> for MathConstants

Source§

fn from_table_ref(from: &T) -> Self

Source§

impl Hash for MathConstants

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for MathConstants

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for MathConstants

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for MathConstants

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ReadArgs for MathConstants

Source§

impl Serialize for MathConstants

Available on crate feature serde only.
Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MathConstants

Source§

impl Validate for MathConstants

Source§

fn validate_impl(&self, _ctx: &mut ValidationCtx)

Validate this table. Read more
Source§

fn validate(&self) -> Result<(), ValidationReport>

Ensure that this table is well-formed, reporting any errors. Read more

Auto Trait Implementations§

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Available on crate feature tables only.
Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Available on crate feature tables only.
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.