MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / loadFont

Method loadFont

src/org/albite/albite/BookCanvas.java:1793–1816  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1791 }
1792
1793 private void loadFont() {
1794 final int currentFontSize;
1795
1796 if (useNativeFonts) {
1797 if (currentFontSizeIndex < 0 || currentFontSizeIndex >= nativeFontSizes.length) {
1798 currentFontSizeIndex = (byte) ((nativeFontSizes.length - 1) / 2);
1799 fontGrowing = true;
1800 }
1801 currentFontSize = nativeFontSizes[currentFontSizeIndex];
1802
1803 fontPlain = new AlbiteNativeFont(Font.STYLE_PLAIN, currentFontSize);
1804 fontItalic = new AlbiteNativeFont(Font.STYLE_ITALIC, currentFontSize);
1805
1806 } else {
1807 if (currentFontSizeIndex < 0 || currentFontSizeIndex >= fontSizes.length) {
1808 currentFontSizeIndex = (byte) ((fontSizes.length - 1) / 2);
1809 fontGrowing = true;
1810 }
1811 currentFontSize = fontSizes[currentFontSizeIndex];
1812
1813 fontPlain = loadBitmapFont("droid-serif_" + currentFontSize);
1814 fontItalic = loadBitmapFont("droid-serif_it_" + currentFontSize);
1815 }
1816 }
1817
1818 private void cycleFontSizes() {
1819 if (

Callers 4

initializeMethod · 0.95
cycleFontSizesMethod · 0.95
setFontSizeMethod · 0.95
switchNativeFontsMethod · 0.95

Calls 1

loadBitmapFontMethod · 0.95

Tested by

no test coverage detected