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.
()
| 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. |
no test coverage detected