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

Method cycleFontSizes

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

Source from the content-addressed store, hash-verified

1816 }
1817
1818 private void cycleFontSizes() {
1819 if (
1820 (!useNativeFonts && fontSizes.length > 1) ||
1821 (useNativeFonts && nativeFontSizes.length > 1)) {
1822
1823 if (currentFontSizeIndex == 0) {
1824 fontGrowing = true;
1825 }
1826
1827 if (currentFontSizeIndex == (useNativeFonts ? nativeFontSizes.length : fontSizes.length) - 1) {
1828 fontGrowing = false;
1829 }
1830
1831 if (fontGrowing) {
1832 currentFontSizeIndex++;
1833 } else {
1834 currentFontSizeIndex--;
1835 }
1836
1837 loadFont();
1838
1839 /*
1840 * Reflow the chapter
1841 */
1842 reflowChapter();
1843 }
1844 }
1845
1846 public final void setFontSize(final byte fontSizeIndex) {
1847

Callers 2

processKeysMethod · 0.95

Calls 2

loadFontMethod · 0.95
reflowChapterMethod · 0.95

Tested by

no test coverage detected