MeasuredText.GetFontMetricsInt(Int32, Int32, Paint+FontMetricsInt) 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.
Retrieves the font metrics of the given range
[Android.Runtime.Register("getFontMetricsInt", "(IILandroid/graphics/Paint$FontMetricsInt;)V", "GetGetFontMetricsInt_IILandroid_graphics_Paint_FontMetricsInt_Handler", ApiSince=33)]
public virtual void GetFontMetricsInt(int start, int end, Android.Graphics.Paint.FontMetricsInt outMetrics);
[<Android.Runtime.Register("getFontMetricsInt", "(IILandroid/graphics/Paint$FontMetricsInt;)V", "GetGetFontMetricsInt_IILandroid_graphics_Paint_FontMetricsInt_Handler", ApiSince=33)>]
abstract member GetFontMetricsInt : int * int * Android.Graphics.Paint.FontMetricsInt -> unit
override this.GetFontMetricsInt : int * int * Android.Graphics.Paint.FontMetricsInt -> unit
Parameters
- start
- Int32
The inclusive start index, in UTF-16 code units. It must be non-negative and no greater than end.
- end
- Int32
The exclusive end index, in UTF-16 code units. It must not exceed the paragraph's UTF-16 length.
- outMetrics
- Paint.FontMetricsInt
The non-null object that receives the font ascent, descent, top, and bottom values, in pixels.
- Attributes
Remarks
Retrieves the font metrics of the given range
The ascent and descent describe the requested range. The top and bottom values also include the paragraph-wide font limits collected from its style runs. This method does not set the leading value.
Vertical metrics use baseline-relative coordinates in pixels: ascent is above the baseline and is normally negative, while descent is below the baseline and is normally positive.
See the range checks and output fields in the Android 16 implementation.
Android reference for android.graphics.text.MeasuredText.getFontMetricsInt.
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.