#[repr(transparent)]pub struct UILetterformAwareSizingRule(pub NSInteger);UILetterformAwareAdjusting only.Expand description
Background
When fonts created with +[UIFont preferredFontForTextStyle:] are used, UILabel, UITextField, and nonscrollable
UITextView will increase the height calculated in -sizeThatFits: and -intrinsicContentSize in the presence
of tall scripts.
Even with this increase, there will be some extreme ascenders and descenders that extend beyond this height.
Furthermore, this increase only occurs for the text-style fonts, so for non-text-style fonts such cases will be markedly more common.
See also Apple’s documentation
Tuple Fields§
§0: NSIntegerImplementations§
Source§impl UILetterformAwareSizingRule
impl UILetterformAwareSizingRule
Sourcepub const Typographic: Self
pub const Typographic: Self
UILetterformAwareSizingRuleTypographic: -sizeThatFits: and -intrinsicContentSize results will work well for typographic alignment of edges and centers of the view frames, but extreme ascenders or descenders in tall scripts may not be accounted for
Sourcepub const Oversize: Self
pub const Oversize: Self
UILetterformAwareSizingRuleOversize: -sizeThatFits: and -intrinsicContentSize results will account for extreme ascenders or descenders in tall scripts, but in such cases might not work well for typographic alignment of top and bottom edges and vertical centers of the view frames
Trait Implementations§
Source§impl Clone for UILetterformAwareSizingRule
impl Clone for UILetterformAwareSizingRule
Source§fn clone(&self) -> UILetterformAwareSizingRule
fn clone(&self) -> UILetterformAwareSizingRule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more