Glyph loading fixes and improvements (for Unicode fonts).

- Glyphs are now loaded for specific fonts as needed, not for all of them at once.  This reduces lag and saves memory.
- Fixed glyphs not being loaded in the downloads menu.
- Moved Utils.loadGlyphs() calls directly above text drawing code (easier to maintain, and fixes a bug with text flickering once).

Also removed MusicController methods 'getTrackName()' and 'getArtistName()' (not needed).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-19 16:45:26 -04:00
parent ec042159a8
commit e6576bd7f9
6 changed files with 39 additions and 47 deletions

View File

@@ -332,6 +332,8 @@ public class DownloadNode {
textX += img.getWidth() + buttonWidth * 0.001f;
// text
if (Options.useUnicodeMetadata()) // load glyphs
Utils.loadGlyphs(Utils.FONT_BOLD, getTitle(), getArtist());
Utils.FONT_BOLD.drawString(
textX, y + marginY,
String.format("%s - %s%s", getArtist(), getTitle(),