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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user