/** * Gets the fontInstanceHashName attribute of the FontResolverTest object * * @param ctx *@param name PARAM * @param size PARAM * @param weight PARAM * @param style PARAM * @param variant PARAM @return The fontInstanceHashName value */ protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant) { return name + "-" + (size * ctx.getTextRenderer().getFontScale()) + "-" + weight + "-" + style + "-" + variant; }
/** * Gets the fontInstanceHashName attribute of the FontResolverTest object * * @param ctx *@param name PARAM * @param size PARAM * @param weight PARAM * @param style PARAM * @param variant PARAM @return The fontInstanceHashName value */ protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant) { return name + "-" + (size * ctx.getTextRenderer().getFontScale()) + "-" + weight + "-" + style + "-" + variant; }
/** * Gets the fontInstanceHashName attribute of the FontResolverTest object * * @param ctx *@param name PARAM * @param size PARAM * @param weight PARAM * @param style PARAM * @param variant PARAM @return The fontInstanceHashName value */ protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant) { return name + "-" + (size * ctx.getTextRenderer().getFontScale()) + "-" + weight + "-" + style + "-" + variant; }
size *= ctx.getTextRenderer().getFontScale();
size *= ctx.getTextRenderer().getFontScale();
size *= ctx.getTextRenderer().getFontScale();
size *= 0.6; size *= ctx.getTextRenderer().getFontScale(); int nSize = Math.round(size);
/** * 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()); }