@Override public Span resize (float size) { return new Span(_gfx, text, style.withFont(style.font.derive(size))); }
@Override public Block resize (float size) { return new Block(_gfx, text, style.withFont(style.font.derive(size)), wrap, align); }
int fontWidth = ScreenDimension.getFontWidth(); return fontWidth == 320 ? new DefaultTextRenderer(gc, baseFont.derive(Font.PLAIN,10,Ui.UNITS_pt), baseFont.derive(Font.PLAIN,6,Ui.UNITS_pt)) : new DefaultTextRenderer(gc, baseFont.derive(Font.PLAIN,12,Ui.UNITS_pt), baseFont.derive(Font.PLAIN,8,Ui.UNITS_pt));
Font font = oldFont.derive(Font.PLAIN, size--); g.setFont(font);
public void draw(Canvas canvas) { // draw a rounded rect directly canvas.setFillGradient(graphics().createLinearGradient( 0, 0, 100, 100, new int[] { 0xFF0000FF, 0xFF00FF00 }, new float[] { 0, 1 })); TextLayout capF = graphics().layoutText("F", new TextFormat().withFont(F_FONT.derive(96))); canvas.fillText(capF, 15, 5); } });
TextLayout capF = game.graphics.layoutText("F", new TextFormat(F_FONT.derive(96))); canvas.fillText(capF, 15, 5); });