(Font fnt, int w, int padding)
| 7713 | } |
| 7714 | |
| 7715 | private static Font sizeFont(Font fnt, int w, int padding) { |
| 7716 | if (!Font.isTrueTypeFileSupported()) { |
| 7717 | return Font.getDefaultFont(); |
| 7718 | } |
| 7719 | int paddingPixels = Display.getInstance().convertToPixels(padding, true); |
| 7720 | w -= paddingPixels; |
| 7721 | int h = fnt.getHeight(); |
| 7722 | if (h != w) { |
| 7723 | return fnt.derive(w, Font.STYLE_PLAIN); |
| 7724 | } |
| 7725 | return fnt; |
| 7726 | } |
| 7727 | |
| 7728 | /// Throws a runtime exception |
| 7729 | @Override |
no test coverage detected