This repository was archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
FontStyleItem
IGR777 edited this page Aug 30, 2018
·
1 revision
Entity which defines font parameters. Includes font, color, size, letter spacing, line height.
UIFont Font - font style's font.
Typeface Typeface - font style's font.
UIColor
Color Color - font style's color.
float Size - font style's size.
float LetterSpacing - font style's letter spacing
float LineHeight - font style's line height.
Under the hood Font style set native fields of text, buttons, etc.
Implementation looks like:
base.Typeface = FontStyle.Typeface;
base.TextSize = FontStyle.Size;
base.SetTextColor(FontStyle.Color);
base.LetterSpacing = FontStyle.LetterSpacing;
Implementation looks like:
base.Font = this.Font.WithSize(TextSize);
this.SetTextSize(TextSize);
base.TextColor = this.TextColor;
this.SetLetterSpacing(LetterSpacing);
SetTextSize and SetLetterSpacing set AttributedString with FontSize and KerningAdjustment.