Layout.Builder.SetMinimumFontMetrics(Paint+FontMetrics) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the minimum font metrics used for line spacing.
[Android.Runtime.Register("setMinimumFontMetrics", "(Landroid/graphics/Paint$FontMetrics;)Landroid/text/Layout$Builder;", "", ApiSince=35)]
public Android.Text.Layout.Builder SetMinimumFontMetrics(Android.Graphics.Paint.FontMetrics? minimumFontMetrics);
[<Android.Runtime.Register("setMinimumFontMetrics", "(Landroid/graphics/Paint$FontMetrics;)Landroid/text/Layout$Builder;", "", ApiSince=35)>]
member this.SetMinimumFontMetrics : Android.Graphics.Paint.FontMetrics -> Android.Text.Layout.Builder
Parameters
- minimumFontMetrics
- Paint.FontMetrics
A minimum font metrics. Passing null for using the value obtained by Paint.getFontMetricsForLocale(Paint.FontMetrics)
Returns
- Attributes
Remarks
Set the minimum font metrics used for line spacing.
null is the default value. If null is set or left as default, the font metrics obtained by Paint.getFontMetricsForLocale(Paint.FontMetrics) is used.
The minimum meaning here is the minimum value of line spacing: maximum value of Paint.ascent(), minimum value of Paint.descent().
By setting this value, each line will have minimum line spacing regardless of the text rendered. For example, usually Japanese script has larger vertical metrics than Latin script. By setting the metrics obtained by Paint.getFontMetricsForLocale(Paint.FontMetrics) for Japanese or leave it null if the Paint's locale is Japanese, the line spacing for Japanese is reserved if the text is an English text. If the vertical metrics of the text is larger than Japanese, for example Burmese, the bigger font metrics is used.
Android reference for android.text.Layout.Builder.setMinimumFontMetrics.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.