()
| 1868 | |
| 1869 | |
| 1870 | @Override |
| 1871 | public float textAscent() { |
| 1872 | if (textFont == null) { |
| 1873 | defaultFontOrDeath("textAscent"); |
| 1874 | } |
| 1875 | |
| 1876 | // This value is dreadfully inaccurate and inconsistent, and especially |
| 1877 | // so for the default font. Switching to use our built-in calculation since |
| 1878 | // our most common use case is likely textAlign(CENTER, CENTER) with the |
| 1879 | // default font, and it needs to work well there. [fry 230716] |
| 1880 | /* |
| 1881 | Font font = (Font) textFont.getNative(); |
| 1882 | if (font != null) { |
| 1883 | return g2.getFontMetrics(font).getAscent(); |
| 1884 | } |
| 1885 | */ |
| 1886 | return super.textAscent(); |
| 1887 | } |
| 1888 | |
| 1889 | |
| 1890 | @Override |
nothing calls this directly
no test coverage detected