MCPcopy Create free account
hub / github.com/HumbleUI/Skija / getMetrics

Method getMetrics

shared/java/Font.java:598–609  ·  view source on GitHub ↗

Returns FontMetrics associated with Typeface. Results are scaled by text size but does not take into account dimensions required by text scale, text skew, fake bold, style stroke, and PathEffect.

()

Source from the content-addressed store, hash-verified

596 * dimensions required by text scale, text skew, fake bold, style stroke, and {@link PathEffect}.
597 */
598 @NotNull
599 public FontMetrics getMetrics() {
600 try {
601 if (_metrics == null) {
602 Stats.onNativeCall();
603 _metrics = _nGetMetrics(_ptr);
604 }
605 return _metrics;
606 } finally {
607 ReferenceUtil.reachabilityFence(this);
608 }
609 }
610
611 /**
612 * Returns the recommended spacing between lines: the sum of metrics descent, ascent, and leading.

Callers 15

runInfoMethod · 0.95
TextLineMethod · 0.80
runInfoMethod · 0.80
drawInterMethod · 0.80
drawByWordsMethod · 0.80
drawTextLinesByWordsMethod · 0.80
FigmaSceneMethod · 0.80
RunIteratorSceneMethod · 0.80
capHeightMethod · 0.80
drawMethod · 0.80

Calls 3

onNativeCallMethod · 0.95
_nGetMetricsMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected