/** * Resets all rendered fonts on the current document to the font size * specified in the document's styling instructions. */ public void resetFontSize() { getSharedContext().getTextRenderer().setFontScale(1f); reload(); }
/** * Resets all rendered fonts on the current document to the font size * specified in the document's styling instructions. */ public void resetFontSize() { SharedContext rc = getSharedContext(); rc.getTextRenderer().setFontScale(1.0F); setDocument(getDocument()); }
/** * Resets all rendered fonts on the current document to the font size * specified in the document's styling instructions. */ public void resetFontSize() { SharedContext rc = getSharedContext(); rc.getTextRenderer().setFontScale(1.0F); setDocument(getDocument()); }
/** * Applies a change in scale for fonts using the rendering context's text * renderer. */ private void scaleFont(float scaleBy) { TextRenderer tr = getSharedContext().getTextRenderer(); float fs = tr.getFontScale() * scaleBy; if (fs < _minFontScale || fs > _maxFontScale) { return; } tr.setFontScale(fs); reload(); }
/** * Applies a change in scale for fonts using the rendering context's text * renderer. */ private void scaleFont(float scaleBy) { SharedContext rc = getSharedContext(); float fs = rc.getTextRenderer().getFontScale() * scaleBy; if (fs < minFontScale || fs > maxFontScale) return; rc.getTextRenderer().setFontScale(fs); setDocument(getDocument()); }
/** * Applies a change in scale for fonts using the rendering context's text * renderer. */ private void scaleFont(float scaleBy) { SharedContext rc = getSharedContext(); float fs = rc.getTextRenderer().getFontScale() * scaleBy; if (fs < minFontScale || fs > maxFontScale) return; rc.getTextRenderer().setFontScale(fs); setDocument(getDocument()); }