protected Glyph generateGlyph(char ch) { GlyphAndBitmap gab = generator.generateGlyphAndBitmap(ch, fontSize, false); if (gab == null || gab.bitmap == null) return null; //modified by STH99 on 2017-6-10 Pixmap map = gab.bitmap.getPixmap(Format.RGBA8888, Color.WHITE, 1.0f); TextureRegion rg = null; if(Game.setting.newTextRender){ if(lazyBitmapFontTexture == null) lazyBitmapFontTexture = new LazyBitmapFontTexture(); rg = lazyBitmapFontTexture.draw(map); if(rg == null) rg = (lazyBitmapFontTexture = new LazyBitmapFontTexture()).draw(map); map.dispose(); font.getRegions().add(rg); }else{ rg = new TextureRegion(new Texture(map)); rg.getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear); map.dispose(); font.getRegions().add(rg); } gab.glyph.page = page++; super.setGlyph(ch, gab.glyph); setGlyphRegion(gab.glyph, rg); return gab.glyph; }