mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 13:56:55 -04:00
支持使用环境变量指定字体 (#3181)
This commit is contained in:
parent
85b68ad135
commit
c81e510bfa
@ -148,7 +148,10 @@ public class Theme {
|
|||||||
public String[] getStylesheets(String overrideFontFamily) {
|
public String[] getStylesheets(String overrideFontFamily) {
|
||||||
String css = "/assets/css/blue.css";
|
String css = "/assets/css/blue.css";
|
||||||
|
|
||||||
String fontFamily = System.getProperty("hmcl.font.override", overrideFontFamily);
|
String fontFamily = overrideFontFamily == null
|
||||||
|
? System.getProperty("hmcl.font.override", System.getenv("HMCL_FONT"))
|
||||||
|
: overrideFontFamily;
|
||||||
|
|
||||||
String fontStyle = null;
|
String fontStyle = null;
|
||||||
if (fontFamily == null) {
|
if (fontFamily == null) {
|
||||||
Optional<Font> font = tryLoadFont();
|
Optional<Font> font = tryLoadFont();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user