runelite-client: Make RuneScape Bold actually Bold
This changes the font name and family for runescape.ttf to just `RuneScape`, and the family of runescape_bold.ttf to `RuneScape`, with the name `RuneScape Bold`. It also sets OS/2 weight and style to Bold. This allows swing's HTML viewer to switch between these fonts naturally with just a font-weight style, or a <strong> element
This commit is contained in:
@@ -62,11 +62,11 @@ public class FontManager
|
|||||||
|
|
||||||
Font boldFont = Font.createFont(Font.TRUETYPE_FONT,
|
Font boldFont = Font.createFont(Font.TRUETYPE_FONT,
|
||||||
FontManager.class.getResourceAsStream("runescape_bold.ttf"))
|
FontManager.class.getResourceAsStream("runescape_bold.ttf"))
|
||||||
.deriveFont(Font.PLAIN, 16);
|
.deriveFont(Font.BOLD, 16);
|
||||||
ge.registerFont(boldFont);
|
ge.registerFont(boldFont);
|
||||||
|
|
||||||
runescapeBoldFont = StyleContext.getDefaultStyleContext()
|
runescapeBoldFont = StyleContext.getDefaultStyleContext()
|
||||||
.getFont(boldFont.getName(), Font.PLAIN, 16);
|
.getFont(boldFont.getName(), Font.BOLD, 16);
|
||||||
ge.registerFont(runescapeBoldFont);
|
ge.registerFont(runescapeBoldFont);
|
||||||
}
|
}
|
||||||
catch (FontFormatException ex)
|
catch (FontFormatException ex)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user