diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b47ffe..c4c9779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,8 @@ All notable changes are listed here. Versions follow [Semantic Versioning](https ## [Unreleased] -- The moves of the notation and the signs after them are bolder (Ubuntu Medium on the - desktop, a heavier weight on Android), and so are the marks in the circles on the board - (Ubuntu Bold). In Russian the report's rows read «Блестящий» and «Замечательный». +- The moves of the notation and the signs after them are bold (Ubuntu Bold on the desktop, + the bold system font on Android), and so are the marks in the circles on the board. In Russian the report's rows read «Блестящий» and «Замечательный». - Android: the dark theme by default (it was the system's); a theme chosen before stays. Android is told the app's own theme, so the window and the splash screen before the diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 41cc7ba..136f4e8 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -170,8 +170,8 @@ Three evaluation signs (⩲ ⩱ ⌓) come from Noto Sans Math (Copyright 2022 Go cut down to those glyphs: `apps/desktop/assets/fonts/NotoSansMath-nag.ttf`, licence beside it. The figurines of the move notation (♔♕♖♗♘) are the five chess glyphs of egui's emoji-icon-font (MIT), cut out to `apps/desktop/assets/fonts/figurines.ttf`. -The moves of the notation and the move marks on the board are in Ubuntu Medium and Ubuntu -Bold (Ubuntu Font Family 0.83, © 2010–2011 Canonical Ltd., Ubuntu Font Licence 1.0), from +The moves of the notation and the move marks on the board are in Ubuntu Bold (Ubuntu Font +Family 0.83, © 2010–2011 Canonical Ltd., Ubuntu Font Licence 1.0), from the official release `https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip` (SHA-256 456d7d42…05b42, as in Arch Linux's `ttf-ubuntu-font-family`): -`apps/desktop/assets/fonts/Ubuntu-M.ttf`, `Ubuntu-B.ttf`, licence `UFL.txt` beside them. +`apps/desktop/assets/fonts/Ubuntu-B.ttf`, licence `UFL.txt` beside it. diff --git a/androidApp/app/src/main/java/io/github/vrubelroman/chesspenguin/ui/Notation.kt b/androidApp/app/src/main/java/io/github/vrubelroman/chesspenguin/ui/Notation.kt index a469cb8..711b0f2 100644 --- a/androidApp/app/src/main/java/io/github/vrubelroman/chesspenguin/ui/Notation.kt +++ b/androidApp/app/src/main/java/io/github/vrubelroman/chesspenguin/ui/Notation.kt @@ -412,7 +412,7 @@ private fun MoveCell( horizontalArrangement = Arrangement.spacedBy(1.dp), ) { val markColor = mark?.takeIf { !selected }?.let { judgementColor(it, chess.dark) } - Text(san(n.san), fontSize = 17.sp, fontWeight = FontWeight.SemiBold, color = markColor ?: MaterialTheme.colorScheme.onSurface) + Text(san(n.san), fontSize = 17.sp, fontWeight = FontWeight.Bold, color = markColor ?: MaterialTheme.colorScheme.onSurface) if (mark != null) { Text(judgementSymbol(mark), fontSize = 17.sp, fontWeight = FontWeight.Bold, color = markColor ?: MaterialTheme.colorScheme.onSurface) } diff --git a/apps/desktop/assets/fonts/Ubuntu-M.ttf b/apps/desktop/assets/fonts/Ubuntu-M.ttf deleted file mode 100644 index ca9c03a..0000000 Binary files a/apps/desktop/assets/fonts/Ubuntu-M.ttf and /dev/null differ diff --git a/apps/desktop/src/assets.rs b/apps/desktop/src/assets.rs index 8feff03..ebdd4fc 100644 --- a/apps/desktop/src/assets.rs +++ b/apps/desktop/src/assets.rs @@ -156,16 +156,10 @@ pub fn install(ctx: &egui::Context) { ctx.set_fonts(font_definitions()); } -/// The font families of the heavier faces. -pub const MEDIUM: &str = "ubuntu-medium"; +/// The font family of the bold face. pub const BOLD: &str = "ubuntu-bold"; -/// A font of the medium face (the moves of the notation). -pub fn medium(size: f32) -> egui::FontId { - egui::FontId::new(size, egui::FontFamily::Name(MEDIUM.into())) -} - -/// A font of the bold face (the marks on the board). +/// A font of the bold face (the moves of the notation, the marks on the board). pub fn bold(size: f32) -> egui::FontId { egui::FontId::new(size, egui::FontFamily::Name(BOLD.into())) } @@ -195,32 +189,28 @@ pub fn font_definitions() -> egui::FontDefinitions { ), ), ); - // The heavier faces of the same family (egui's text is Ubuntu Light): the moves of the + // The bold face of the same family (egui's text is Ubuntu Light): the moves of the // notation and the marks on the board. - for (name, bytes) in [ - (MEDIUM, &include_bytes!("../assets/fonts/Ubuntu-M.ttf")[..]), - (BOLD, &include_bytes!("../assets/fonts/Ubuntu-B.ttf")[..]), - ] { - fonts.font_data.insert( - name.into(), - std::sync::Arc::new(egui::FontData::from_static(bytes)), - ); - let mut list = vec![name.to_string()]; - list.extend( - fonts - .families - .get(&egui::FontFamily::Proportional) - .cloned() - .unwrap_or_default(), - ); + fonts.font_data.insert( + BOLD.into(), + std::sync::Arc::new(egui::FontData::from_static(include_bytes!( + "../assets/fonts/Ubuntu-B.ttf" + ))), + ); + let mut bold = vec![BOLD.to_string()]; + bold.extend( fonts .families - .insert(egui::FontFamily::Name(name.into()), list); - } + .get(&egui::FontFamily::Proportional) + .cloned() + .unwrap_or_default(), + ); + fonts + .families + .insert(egui::FontFamily::Name(BOLD.into()), bold); for family in [ egui::FontFamily::Proportional, egui::FontFamily::Monospace, - egui::FontFamily::Name(MEDIUM.into()), egui::FontFamily::Name(BOLD.into()), ] { if let Some(list) = fonts.families.get_mut(&family) { @@ -235,7 +225,6 @@ pub fn font_definitions() -> egui::FontDefinitions { for family in [ egui::FontFamily::Proportional, egui::FontFamily::Monospace, - egui::FontFamily::Name(MEDIUM.into()), egui::FontFamily::Name(BOLD.into()), ] { if let Some(list) = fonts.families.get_mut(&family) { diff --git a/apps/desktop/src/notation.rs b/apps/desktop/src/notation.rs index 1762783..a45cbfe 100644 --- a/apps/desktop/src/notation.rs +++ b/apps/desktop/src/notation.rs @@ -602,7 +602,7 @@ fn paint_move_cell( cell.left_center() + vec2(10.0, 0.0), Align2::LEFT_CENTER, format!("{san}{sym}"), - crate::assets::medium(16.0), + crate::assets::bold(16.0), text_color, ) .right()