feat(ui): Anthropic-inspired chrome with Source Han pairing
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Check Codes / build (push) Successful in 5m53s
Check Codes / build (pull_request) Successful in 3m39s
Java CI / build (push) Failing after 3h0m10s
Java CI / build (pull_request) Failing after 3h0m2s

Calm olive-slate Monet seed, surface title bar, quieter cards, TDLM
branding, and hard-bound Source Han Sans Bold (titles) + Source Han
Serif (body) via UI-charset OFL subsets (~2MB).
This commit is contained in:
layue13 committed 2026-11-07 20:28:14 +00:00
1 parent 4cd783d6bb
commit ebb71b205d
21 files changed
+343 -129

No files matched your search

@@ -19,8 +19,8 @@ public final class Metadata {
private Metadata() {
}
public static final String NAME = "HMCL";
public static final String FULL_NAME = "Hello Minecraft! Launcher";
public static final String NAME = "TDLM";
public static final String FULL_NAME = "TDLM";
public static final String VERSION = System.getProperty("hmcl.version.override", JarUtils.getAttribute("hmcl.version", "@develop@"));
/// Explicit Application User Model ID used for Windows taskbar grouping and pinning.
@@ -36,7 +36,22 @@ public final class FontManager {
public static final double DEFAULT_FONT_SIZE = 12.0f;
/// Bundled Anthropic UI title face (Source Han Sans SC Bold subset).
public static final String TITLE_FONT_FAMILY = "Source Han Sans SC";
/// Bundled Anthropic UI body face (Source Han Serif SC Regular subset).
public static final String BODY_FONT_FAMILY = "Source Han Serif SC";
private static final String BUNDLED_TITLE_FONT = "/assets/fonts/SourceHanSansSC-Bold.otf";
private static final String BUNDLED_BODY_FONT = "/assets/fonts/SourceHanSerifSC-Regular.otf";
private static volatile boolean bundledFontsLoaded;
private static volatile @Nullable String loadedTitleFamily;
private static volatile @Nullable String loadedBodyFamily;
private static final Lazy<Font> DEFAULT_FONT = new Lazy<>(() -> {
ensureBundledFontsLoaded();
Font font;
// Recommended
@@ -70,6 +85,11 @@ public final class FontManager {
return font;
}
// Anthropic UI hard-bind: bundled Source Han Serif body face
if (loadedBodyFamily != null) {
return Font.font(loadedBodyFamily, DEFAULT_FONT_SIZE);
}
// Default
String fcMatchPattern;
@@ -83,8 +103,62 @@ public final class FontManager {
private static final ObjectProperty<FontReference> font = new SimpleObjectProperty<>();
static {
ensureBundledFontsLoaded();
updateFont();
LOG.info("Font: " + (font.get() != null ? font.get().family() : "System"));
LOG.info("Font: " + (font.get() != null ? font.get().family() : "System")
+ ", title=" + Objects.requireNonNullElse(loadedTitleFamily, "unavailable")
+ ", body=" + Objects.requireNonNullElse(loadedBodyFamily, "unavailable"));
}
/// Registers the bundled Source Han subsets so CSS family names resolve.
public static void ensureBundledFontsLoaded() {
if (bundledFontsLoaded) {
return;
}
synchronized (FontManager.class) {
if (bundledFontsLoaded) {
return;
}
loadedTitleFamily = loadBundledFont(BUNDLED_TITLE_FONT, TITLE_FONT_FAMILY);
loadedBodyFamily = loadBundledFont(BUNDLED_BODY_FONT, BODY_FONT_FAMILY);
bundledFontsLoaded = true;
}
}
/// Returns the resolved title font family after bundled registration, or the hard-bind name.
public static String getTitleFontFamily() {
ensureBundledFontsLoaded();
return Objects.requireNonNullElse(loadedTitleFamily, TITLE_FONT_FAMILY);
}
/// Returns the resolved body font family after bundled registration, or the hard-bind name.
public static String getBodyFontFamily() {
ensureBundledFontsLoaded();
return Objects.requireNonNullElse(loadedBodyFamily, BODY_FONT_FAMILY);
}
private static @Nullable String loadBundledFont(String resourcePath, String expectedFamily) {
try (var input = FontManager.class.getResourceAsStream(resourcePath)) {
if (input == null) {
LOG.warning("Bundled font missing: " + resourcePath);
return null;
}
Font loaded = Font.loadFont(input, DEFAULT_FONT_SIZE);
if (loaded == null) {
LOG.warning("Failed to decode bundled font: " + resourcePath);
return null;
}
String family = loaded.getFamily();
LOG.info("Loaded bundled font " + resourcePath + " as family '" + family + "'");
if (!expectedFamily.equalsIgnoreCase(family)) {
LOG.warning("Bundled font family mismatch for " + resourcePath
+ ": expected '" + expectedFamily + "', got '" + family + "'");
}
return family;
} catch (Exception e) {
LOG.warning("Failed to load bundled font " + resourcePath, e);
return null;
}
}
private static void updateFont() {
@@ -96,7 +170,7 @@ public final class FontManager {
if (fontFamily == null) {
Font defaultFont = DEFAULT_FONT.get();
font.set(defaultFont != null ? new FontReference(defaultFont) : null);
font.set(defaultFont != null ? new FontReference(defaultFont) : new FontReference(BODY_FONT_FAMILY));
} else {
font.set(new FontReference(fontFamily));
}
@@ -10,7 +10,6 @@ import javafx.scene.paint.Color;
import org.glavo.monetfx.Brightness;
import org.glavo.monetfx.ColorRole;
import org.glavo.monetfx.ColorScheme;
import org.jackhuang.hmcl.theme.ResolvedTheme;
import org.jackhuang.hmcl.theme.ThemeColor;
import org.jackhuang.hmcl.theme.Themes;
@@ -50,51 +49,72 @@ public final class StyleSheets {
}
private static String getFontStyleSheet() {
final String defaultCss = "/assets/css/font.css";
FontManager.ensureBundledFontsLoaded();
final FontManager.FontReference font = FontManager.getFont();
if (font == null || "System".equals(font.family()))
return defaultCss;
String fontFamily = font.family();
String style = font.style();
String bodyFamily = FontManager.getBodyFontFamily();
String titleFamily = FontManager.getTitleFontFamily();
String weight = null;
String posture = null;
if (style != null) {
style = style.toLowerCase(Locale.ROOT);
// Explicit user / env override replaces body face only; titles stay Source Han Sans Bold.
if (font != null && !"System".equals(font.family())
&& !FontManager.BODY_FONT_FAMILY.equalsIgnoreCase(font.family())
&& !FontManager.TITLE_FONT_FAMILY.equalsIgnoreCase(font.family())) {
bodyFamily = font.family();
String style = font.style();
if (style != null) {
style = style.toLowerCase(Locale.ROOT);
if (style.contains("thin"))
weight = "100";
else if (style.contains("extralight") || style.contains("extra light") || style.contains("ultralight") | style.contains("ultra light"))
weight = "200";
else if (style.contains("medium"))
weight = "500";
else if (style.contains("semibold") || style.contains("semi bold") || style.contains("demibold") || style.contains("demi bold"))
weight = "600";
else if (style.contains("extrabold") || style.contains("extra bold") || style.contains("ultrabold") || style.contains("ultra bold"))
weight = "800";
else if (style.contains("black") || style.contains("heavy"))
weight = "900";
else if (style.contains("light"))
weight = "lighter";
else if (style.contains("bold"))
weight = "bold";
if (style.contains("thin"))
weight = "100";
else if (style.contains("extralight") || style.contains("extra light") || style.contains("ultralight") | style.contains("ultra light"))
weight = "200";
else if (style.contains("medium"))
weight = "500";
else if (style.contains("semibold") || style.contains("semi bold") || style.contains("demibold") || style.contains("demi bold"))
weight = "600";
else if (style.contains("extrabold") || style.contains("extra bold") || style.contains("ultrabold") || style.contains("ultra bold"))
weight = "800";
else if (style.contains("black") || style.contains("heavy"))
weight = "900";
else if (style.contains("light"))
weight = "lighter";
else if (style.contains("bold"))
weight = "bold";
posture = style.contains("italic") || style.contains("oblique") ? "italic" : null;
posture = style.contains("italic") || style.contains("oblique") ? "italic" : null;
}
}
StringBuilder builder = new StringBuilder();
builder.append(".root {");
builder.append("-fx-font-family:\"").append(fontFamily).append("\";");
builder.append("-fx-font-family:\"").append(bodyFamily).append("\", \"Source Han Serif\", serif;");
if (weight != null)
builder.append("-fx-font-weight:").append(weight).append(";");
if (posture != null)
builder.append("-fx-font-style:").append(posture).append(";");
builder.append("}\n");
builder.append('}');
builder.append("""
.jfx-decorator-title,
.jfx-tool-bar-second .label,
.title-label,
.class-title,
.class-title Text,
.jfx-layout-heading,
.launch-pane > .launch-button .label,
.announcement .title,
.method-title,
.radio-button-title-label,
.two-line-list-item > .title,
.advanced-list-item > .rippler-container > .container > .title,
.jfx-button-raised,
.jfx-button-raised * {
""");
builder.append("-fx-font-family:\"").append(titleFamily).append("\", \"Source Han Sans\", \"思源黑体\", sans-serif;");
builder.append("-fx-font-weight:bold;");
builder.append("}\n");
return toStyleSheetUri(builder.toString());
}
@@ -122,11 +142,6 @@ public final class StyleSheets {
}
private static String getThemeStyleSheet() {
final String blueCss = "/assets/css/blue.css";
if (ResolvedTheme.DEFAULT.equals(Themes.getTheme()))
return blueCss;
ColorScheme scheme = Themes.getColorScheme();
StringBuilder builder = new StringBuilder();
@@ -26,10 +26,12 @@ import java.util.Objects;
@JsonSerializable
public record ThemeColor(@NotNull String name, @NotNull Color color) {
public static final ThemeColor DEFAULT = new ThemeColor("blue", Color.web("#5C6BC0"));
/// Default Anthropic-inspired seed: muted olive slate (calm neutrals, no purple-AI cast).
public static final ThemeColor DEFAULT = new ThemeColor("stone", Color.web("#3D453C"));
public static final List<ThemeColor> STANDARD_COLORS = List.of(
DEFAULT,
new ThemeColor("blue", Color.web("#5C6BC0")),
new ThemeColor("darker_blue", Color.web("#283593")),
new ThemeColor("green", Color.web("#43A047")),
new ThemeColor("orange", Color.web("#E67E22")),
@@ -1103,10 +1103,11 @@ public final class Themes {
);
/// The title text fill derived from the current color scheme.
///
/// Title chrome uses surface tones (Anthropic-like calm bar), so fill stays on-surface
/// whether or not the bar is translucent.
private static final ObjectBinding<Color> titleFill = Bindings.createObjectBinding(
() -> titleBarTransparent.get()
? getColorScheme().getOnSurface()
: getColorScheme().getOnPrimaryContainer(),
() -> getColorScheme().getOnSurface(),
colorSchemeProperty(),
titleBarTransparent
);
@@ -83,8 +83,8 @@ public final class Decorator {
/// The minimum width, in pixels, of the visible window content.
private static final double MIN_CONTENT_WIDTH = 800.0;
/// The minimum height, in pixels, including the 450-pixel background and 40-pixel title bar.
private static final double MIN_CONTENT_HEIGHT = 450.0 + 40.0;
/// The minimum height, in pixels, including the 450-pixel background and 48-pixel title bar.
private static final double MIN_CONTENT_HEIGHT = 450.0 + 48.0;
/// The minimum visible overlap, in pixels, used to accept a persisted window position.
private static final double MIN_VISIBLE_WINDOW_AREA = 20.0;
@@ -173,7 +173,7 @@ final class MainWindowPane extends StackPane {
HBox buttons = new HBox();
buttons.setAlignment(Pos.TOP_RIGHT);
decorator.capableDraggingWindow(buttons);
buttons.setMaxSize(Region.USE_PREF_SIZE, 40);
buttons.setMaxSize(Region.USE_PREF_SIZE, 48);
JFXButton minimizeButton = new JFXButton();
minimizeButton.setFocusTraversable(false);
@@ -194,6 +194,9 @@ final class MainWindowPane extends StackPane {
}
/// Recomputes the title-bar background for the current theme and transparency preference.
///
/// Uses surface / surface-container tones so the chrome stays calm and brand-forward
/// instead of a saturated primary strip.
private void updateTitleBarBackground() {
@Nullable ColorScheme colorScheme = Themes.getColorScheme();
if (colorScheme == null) {
@@ -206,7 +209,7 @@ final class MainWindowPane extends StackPane {
Insets.EMPTY)));
} else {
titleBar.setBackground(new Background(new BackgroundFill(
colorScheme.getPrimaryContainer(),
colorScheme.getSurfaceContainer(),
CornerRadii.EMPTY,
Insets.EMPTY)));
}
@@ -31,7 +31,7 @@ public class DownloadSettingsPage extends StackPane {
public DownloadSettingsPage() {
VBox content = new VBox(10);
content.setPadding(new Insets(10));
content.setPadding(new Insets(16, 18, 18, 18));
content.setFillWidth(true);
ScrollPane scrollPane = new ScrollPane(content);
FXUtils.smoothScrolling(scrollPane);
@@ -79,7 +79,7 @@ public final class MainPage extends StackPane implements DecoratorPage {
state.setValue(new State(null, titleNode, false, false, true));
setPadding(new Insets(20));
setPadding(new Insets(28));
@@ -1017,7 +1017,7 @@ public class PersonalizationPage extends StackPane {
}
}
vbox.getChildren().add(new Label("Hello Minecraft! Launcher"));
vbox.getChildren().add(new Label("TDLM"));
fontPane.getContent().add(vbox);
}
@@ -47,8 +47,8 @@ public final class SettingsPage extends ScrollPane {
public SettingsPage() {
this.setFitToWidth(true);
VBox rootPane = new VBox(10);
rootPane.setPadding(new Insets(10));
VBox rootPane = new VBox(14);
rootPane.setPadding(new Insets(16, 18, 18, 18));
this.setContent(rootPane);
FXUtils.smoothScrolling(this);
+23 -3
View File
@@ -1,8 +1,28 @@
/*
* SPDX-FileCopyrightText: Copyright (C) 2025 The HMCL Authors
* SPDX-License-Identifier: GPL-3.0-or-later WITH AdditionRef-HMCL
*
* Anthropic UI hard-bind: Source Han Serif (body) + Source Han Sans Bold (titles).
* Bundled OFL subsets are registered by FontManager before stylesheets attach.
*/
.root {
/* https://github.com/HMCL-dev/HMCL/pull/3423 */
-fx-font-family: -fx-base-font-family;
}
-fx-font-family: "Source Han Serif SC", "Source Han Serif", serif;
}
.jfx-decorator-title,
.jfx-tool-bar-second .label,
.title-label,
.class-title,
.class-title Text,
.jfx-layout-heading,
.launch-pane > .launch-button .label,
.announcement .title,
.method-title,
.radio-button-title-label,
.two-line-list-item > .title,
.advanced-list-item > .rippler-container > .container > .title,
.jfx-button-raised,
.jfx-button-raised * {
-fx-font-family: "Source Han Sans SC", "Source Han Sans", "思源黑体", sans-serif;
-fx-font-weight: bold;
}
+63 -61
View File
@@ -229,8 +229,8 @@
}
.class-title {
-fx-font-size: 12px;
-fx-padding: 8 16 8 16;
-fx-font-size: 11px;
-fx-padding: 14 16 10 16;
}
.class-title Text {
@@ -421,57 +421,57 @@
******************************************************************************/
.launch-pane {
-fx-max-height: 57px;
-fx-min-height: 57px;
-fx-max-width: 230px;
-fx-min-width: 230px;
-fx-max-height: 64px;
-fx-min-height: 64px;
-fx-max-width: 248px;
-fx-min-width: 248px;
}
.launch-pane > .jfx-button {
-fx-translate-y: 1px;
-fx-max-height: 55px;
-fx-min-height: 55px;
-fx-background-color: -monet-primary-container;
-fx-max-height: 62px;
-fx-min-height: 62px;
-fx-background-color: -monet-primary;
-fx-opacity: 1; /* Override the opacity of disabled button */
-fx-cursor: hand;
}
.launch-pane > .jfx-button.launch-button {
-fx-max-width: 200px;
-fx-min-width: 200px;
-fx-border-width: 0 3px 0 0;
-fx-max-width: 214px;
-fx-min-width: 214px;
-fx-border-width: 0 1px 0 0;
-fx-border-color: linear-gradient(
to bottom,
transparent 0%,
transparent 20%,
-monet-on-surface-variant 20%,
-monet-on-surface-variant 80%,
transparent 80%,
to bottom,
transparent 0%,
transparent 22%,
-monet-on-primary 22%,
-monet-on-primary 78%,
transparent 78%,
transparent 100%
);
-fx-background-radius: 4px 0 0 4px;
-fx-background-radius: 8px 0 0 8px;
}
.launch-pane > .jfx-button.menu-button {
-fx-max-width: 27px;
-fx-min-width: 27px;
-fx-max-width: 32px;
-fx-min-width: 32px;
-fx-font-size: 15px;
-fx-background-radius: 0 4px 4px 0;
-fx-background-radius: 0 8px 8px 0;
}
.launch-pane > .jfx-button > StackPane > .jfx-rippler {
-jfx-rippler-fill: -monet-on-primary-container;
-jfx-rippler-fill: -monet-on-primary;
-jfx-mask-type: CIRCLE;
-fx-padding: 0;
}
.launch-pane > .launch-button .label {
-fx-text-fill: -monet-on-primary-container;
-fx-font-size: 14px;
-fx-text-fill: -monet-on-primary;
-fx-font-size: 15px;
}
.launch-pane .svg {
-fx-fill: -monet-on-primary-container;
-fx-fill: -monet-on-primary;
}
/*******************************************************************************
@@ -671,17 +671,18 @@
.jfx-tool-bar {
-fx-font-size: 13.0;
-fx-pref-width: 100.0%;
-fx-min-height: 40px;
-fx-max-height: 40px;
-fx-pref-height: 40px;
-fx-min-height: 48px;
-fx-max-height: 48px;
-fx-pref-height: 48px;
}
.jfx-tool-bar .jfx-decorator-title {
-fx-font-weight: BOLD;
-fx-font-size: 16px;
}
.jfx-tool-bar.background {
-fx-background-color: -monet-primary-container;
-fx-background-color: -monet-surface-container;
}
/*.jfx-tool-bar HBox {*/
@@ -690,21 +691,21 @@
/*}*/
.jfx-tool-bar .jfx-decorator-button {
-fx-min-width: 40px;
-fx-max-width: 40px;
-fx-pref-width: 40px;
-fx-min-height: 40px;
-fx-max-height: 40px;
-fx-pref-height: 40px;
-fx-min-width: 44px;
-fx-max-width: 44px;
-fx-pref-width: 44px;
-fx-min-height: 44px;
-fx-max-height: 44px;
-fx-pref-height: 44px;
-fx-cursor: hand;
}
.jfx-tool-bar .jfx-decorator-button .svg {
-fx-fill: -monet-on-primary-container;
-fx-fill: -monet-on-surface;
}
.jfx-decorator-button .jfx-spinner .arc {
-fx-stroke: -monet-on-primary-container;
-fx-stroke: -monet-on-surface;
}
.jfx-tool-bar Label {
@@ -732,15 +733,15 @@
}
.jfx-tool-bar-second {
-fx-pref-height: 42;
-fx-padding: 2 2 2 2;
-fx-background-color: -monet-primary-container;
-fx-pref-height: 48;
-fx-padding: 4 8 4 8;
-fx-background-color: -monet-surface-container;
-fx-alignment: CENTER-LEFT;
-fx-spacing: 8;
}
.jfx-tool-bar-second .label {
-fx-text-fill: -monet-on-primary-container;
-fx-text-fill: -monet-on-surface;
-fx-font-size: 16;
-fx-font-weight: bold;
}
@@ -1040,7 +1041,7 @@
.options-list {
-fx-background-color: transparent;
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 5, 0.06, -0.5, 1);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.08), 4, 0.04, 0, 1);
}
.depth-0 {
@@ -1048,23 +1049,23 @@
}
.depth-1 {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 10, 0.12, -1, 2);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.10), 8, 0.08, 0, 1);
}
.depth-2 {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 15, 0.16, 0, 4);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.12), 12, 0.10, 0, 2);
}
.depth-3 {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 20, 0.19, 0, 6);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.14), 16, 0.12, 0, 3);
}
.depth-4 {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 25, 0.25, 0, 8);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.16), 20, 0.14, 0, 4);
}
.depth-5 {
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 30, 0.3, 0, 10);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.18), 24, 0.16, 0, 5);
}
.padding-8 {
@@ -1073,25 +1074,25 @@
.card {
-fx-background-color: -monet-surface-container-low-transparent-80;
-fx-background-radius: 4;
-fx-padding: 8px;
-fx-background-radius: 8;
-fx-padding: 12px;
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 10, 0.12, -1, 2);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.08), 6, 0.06, 0, 1);
}
.card-no-padding {
-fx-background-color: -monet-surface-container-low-transparent-80;
-fx-background-radius: 4;
-fx-background-radius: 8;
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 10, 0.12, -1, 2);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.08), 6, 0.06, 0, 1);
}
.card-non-transparent {
-fx-background-color: -monet-surface-container-low;
-fx-background-radius: 4;
-fx-padding: 8px;
-fx-background-radius: 8;
-fx-padding: 12px;
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.26), 5, 0.06, -0.5, 1);
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.08), 4, 0.04, 0, 1);
}
.card-list {
@@ -1781,15 +1782,16 @@
*******************************************************************************/
.jfx-decorator {
-fx-decorator-color: -monet-primary-container;
-fx-decorator-color: -monet-surface-container;
}
.jfx-decorator-drawer {
-fx-background-color: rgba(244, 244, 244, 0.5);
-fx-background-color: -monet-surface-transparent-80;
}
.jfx-decorator-title {
-fx-font-size: 14;
-fx-font-size: 16;
-fx-font-weight: bold;
}
.debug-border {
@@ -1798,11 +1800,11 @@
}
.content-background {
-fx-background-color: -monet-surface-transparent-50;
-fx-background-color: -monet-surface-transparent-80;
}
.gray-background {
-fx-background-color: -monet-surface-transparent-50;
-fx-background-color: -monet-surface-container-low-transparent-80;
}
/*******************************************************************************
@@ -0,0 +1,96 @@
Copyright 2014-2025 Adobe (http://www.adobe.com/), with Reserved Font
Name 'Source'. Source is a trademark of Adobe in the United States
and/or other countries.
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -936,9 +936,9 @@ launcher.cache_directory.disabled=Disabled
launcher.cache_directory.invalid=Failed to create a cache directory, falling back to default.
launcher.crash=HMCL has encountered a fatal error! Please copy the following log and ask for help on GitHub or other Minecraft forums.
launcher.crash.java_internal_error=HMCL has encountered a fatal error because your Java is corrupted. Please uninstall your Java and download a suitable Java <a href="https://bell-sw.com/pages/downloads/#downloads">here</a>.
launcher.title=Hello Minecraft! Launcher v%s
launcher.title.modified=Hello Minecraft! Launcher v%s (Modified)
launcher.title.unofficial=Hello Minecraft! Launcher v%s (Unofficial Build)
launcher.title=TDLM v%s
launcher.title.modified=TDLM v%s (Modified)
launcher.title.unofficial=TDLM v%s (Unofficial Build)
launcher.update_java=Please update your Java version.
libraries.download=Downloading Libraries
@@ -756,9 +756,9 @@ launcher.cache_directory.disabled=禁 (恒用戲案夾之徑)
launcher.cache_directory.invalid=自訂之快取夾不能立。既復初。
launcher.crash=HMCL 有謬而弗能正。宜鈔下文而報謬于右下之鈕。
launcher.crash.java_internal_error=HMCL 不能行,以爪哇壞也。宜去是爪哇,而擊<a href="https://bell-sw.com/pages/downloads/#downloads">此</a>以置爪哇之適者。
launcher.title=Hello Minecraft! Launcher v%s
launcher.title.modified=Hello Minecraft! Launcher %s (已改)
launcher.title.unofficial=Hello Minecraft! Launcher %s (非官版)
launcher.title=TDLM v%s
launcher.title.modified=TDLM %s (已改)
launcher.title.unofficial=TDLM %s (非官版)
launcher.update_java=宜迭更爪哇。\n君可求助於 https://docs.hmcl.net/help.html。
libraries.download=引之所依
@@ -759,9 +759,9 @@ launcher.cache_directory.disabled=禁用 (总是使用游戏文件夹路径)
launcher.cache_directory.invalid=无法创建自定义的缓存文件夹。已经恢复到默认设置。
launcher.crash=HMCL 遇到了无法处理的错误。请复制下列内容并点击右下角的按钮反馈问题。
launcher.crash.java_internal_error=HMCL 由于当前 Java 损坏而无法继续运行。请卸载当前 Java,点击 <a href="https://bell-sw.com/pages/downloads/#downloads">此处</a> 安装合适的 Java 版本。
launcher.title=Hello Minecraft! Launcher %s
launcher.title.modified=Hello Minecraft! Launcher %s (已修改)
launcher.title.unofficial=Hello Minecraft! Launcher %s (非官方构建)
launcher.title=TDLM %s
launcher.title.modified=TDLM %s (已修改)
launcher.title.unofficial=TDLM %s (非官方构建)
launcher.update_java=请更新你的 Java。\n你可以访问 https://docs.hmcl.net/help.html 页面寻求帮助。
libraries.download=下载依赖库
@@ -753,9 +753,9 @@ launcher.cache_directory.disabled=停用
launcher.cache_directory.invalid=無法建立自訂的快取目錄。已還原至預設設定。
launcher.crash=HMCL 遇到了無法處理的錯誤。請複製下列內容並透過 GitHub 或其他 Minecraft 論壇回報問題。
launcher.crash.java_internal_error=HMCL 由於目前 Java 損壞而無法繼續執行。請移除目前 Java,點擊 <a href="https://bell-sw.com/pages/downloads/#downloads">此處</a> 安裝合適的 Java 版本。
launcher.title=Hello Minecraft! Launcher %s
launcher.title.modified=Hello Minecraft! Launcher %s (已修改)
launcher.title.unofficial=Hello Minecraft! Launcher %s (非官方建置)
launcher.title=TDLM %s
launcher.title.modified=TDLM %s (已修改)
launcher.title.unofficial=TDLM %s (非官方建置)
launcher.update_java=請更新你的 Java
libraries.download=下載依賴庫
@@ -15,6 +15,7 @@ public final class ThemeColorTest {
@Test
public void testOf() {
assertEquals(new ThemeColor("#AABBCC", Color.web("#AABBCC")), ThemeColor.of("#AABBCC"));
assertEquals(new ThemeColor("stone", Color.web("#3D453C")), ThemeColor.of("stone"));
assertEquals(new ThemeColor("blue", Color.web("#5C6BC0")), ThemeColor.of("blue"));
assertEquals(new ThemeColor("darker_blue", Color.web("#283593")), ThemeColor.of("darker_blue"));
assertEquals(new ThemeColor("green", Color.web("#43A047")), ThemeColor.of("green"));