Skip to content

Commit

Permalink
style: standardize font style names across project
Browse files Browse the repository at this point in the history
- fix typo in font style names
- remove .into() method calls from font style strings
- update font style names to match font file names
- ensure font style names are consistent
  • Loading branch information
falcucci committed Sep 21, 2024
1 parent c856e63 commit 6b4a05d
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/test/font_styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn firacode_normal() {
"FiraCode Nerd Font",
))],
"FiraCode Normal",
"FiraCode Nerd Font Reg".into(),
"FiraCode Nerd Font Reg",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -90,7 +90,7 @@ fn firacode_native_bold() {
StyleProperty::FontWeight(FontWeight::BOLD),
],
"FiraCode (Native) Bold",
"FiraCode Nerd Font Bold".into(),
"FiraCode Nerd Font Bold",
Attributes::new(Stretch::NORMAL, Weight::BOLD, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -108,7 +108,7 @@ fn firacode_faux_italic() {
StyleProperty::FontStyle(FontStyle::Italic),
],
"FiraCode (Faux) Italic",
"FiraCode Nerd Font Reg".into(),
"FiraCode Nerd Font Reg",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -126,7 +126,7 @@ fn firacode_oblique_5_degrees() {
StyleProperty::FontStyle(FontStyle::Oblique(Some(5.0))),
],
"FiraCode Oblique 5 degrees",
"FiraCode Nerd Font Reg".into(),
"FiraCode Nerd Font Reg",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -144,7 +144,7 @@ fn firacode_synthetic_stretch_wide() {
StyleProperty::FontStretch(FontStretch::EXPANDED),
],
"FiraCode Synthetic Stretch Wide",
"FiraCode Nerd Font Reg".into(),
"FiraCode Nerd Font Reg",
// FIXME: Fontique does not support synthetic stretch
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
Expand All @@ -163,7 +163,7 @@ fn profontwindows_nerd_font_faux_bold() {
StyleProperty::FontWeight(FontWeight::BOLD),
],
"ProFontWindows Nerd Font (Faux) Bold",
"ProFontWindows Nerd Font".into(),
"ProFontWindows Nerd Font",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -182,7 +182,7 @@ fn caskaydiacove_nerd_font_italic() {
StyleProperty::FontStyle(FontStyle::Italic),
],
"CaskaydiaCove Nerd Font Italic",
"CaskaydiaCove NF Italic".into(),
"CaskaydiaCove NF Italic",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Italic),
Synthesis {
vars: vec![],
Expand All @@ -199,7 +199,7 @@ fn monaspace_xenon_var() {
"Monaspace Xenon Var",
))],
"Monaspace Xenon Var",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -217,7 +217,7 @@ fn monaspace_xenon_var_variadic_bold() {
StyleProperty::FontWeight(FontWeight::BOLD),
],
"Monaspace Xenon Var (Variadic) Bold",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![crate::Setting {
Expand All @@ -238,7 +238,7 @@ fn monaspace_xenon_var_variadic_italic_buggy() {
StyleProperty::FontStyle(FontStyle::Italic),
],
"Monaspace Xenon Var (Variadic) Italic",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![crate::Setting {
Expand All @@ -261,7 +261,7 @@ fn monaspace_xenon_var_oblique_minus_10_degrees() {
StyleProperty::FontStyle(FontStyle::Oblique(Some(-10.0))),
],
"Monaspace Xenon Var Oblique -10 degrees",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![crate::Setting {
Expand All @@ -282,7 +282,7 @@ fn monaspace_xenon_var_oblique_5_degrees_no_italic() {
StyleProperty::FontStyle(FontStyle::Oblique(Some(-5.0))),
],
"Monaspace Xenon Var Oblique 5 degreees = no italic",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![crate::Setting {
Expand All @@ -305,7 +305,7 @@ fn monaspace_xenon_var_stretch_113_weight_637_oblique_minus_8_degrees() {
StyleProperty::FontStretch(FontStretch::from_percentage(113.0)),
],
"Monaspace Xenon Var Stretch=113 Weight = 637, Oblique -8 degrees",
"Monaspace Xenon Var Regular".into(),
"Monaspace Xenon Var Regular",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![
Expand Down Expand Up @@ -336,7 +336,7 @@ fn notoserif_normal() {
"NotoSerif Nerd Font",
))],
"Noto Serif Normal",
"NotoSerif NF Reg".into(),
"NotoSerif NF Reg",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -355,7 +355,7 @@ fn notoserif_bold() {
StyleProperty::FontWeight(FontWeight::BOLD),
],
"Noto Serif Bold",
"NotoSerif NF Bold".into(),
"NotoSerif NF Bold",
Attributes::new(Stretch::NORMAL, Weight::BOLD, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -374,7 +374,7 @@ fn notoserif_condensed() {
StyleProperty::FontStretch(FontStretch::CONDENSED),
],
"Noto Serif Condensed",
"NotoSerif NF Cond Reg".into(),
"NotoSerif NF Cond Reg",
Attributes::new(Stretch::CONDENSED, Weight::NORMAL, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -394,7 +394,7 @@ fn notoserif_bold_condensed() {
StyleProperty::FontStretch(FontStretch::CONDENSED),
],
"Noto Serif Bold Condensed",
"NotoSerif NF Cond Bold".into(),
"NotoSerif NF Cond Bold",
Attributes::new(Stretch::CONDENSED, Weight::BOLD, Style::Normal),
Synthesis {
vars: vec![],
Expand All @@ -413,7 +413,7 @@ fn notoserif_italic() {
StyleProperty::FontStyle(FontStyle::Italic),
],
"Noto Serif Italic",
"NotoSerif NF Italic".into(),
"NotoSerif NF Italic",
Attributes::new(Stretch::NORMAL, Weight::NORMAL, Style::Italic),
Synthesis {
vars: vec![],
Expand All @@ -434,7 +434,7 @@ fn notoserif_bold_condensed_italic() {
StyleProperty::FontStyle(FontStyle::Italic),
],
"Noto Serif Bold Condensed Italic",
"NotoSerif NF Cond Bold Italic".into(),
"NotoSerif NF Cond Bold Italic",
Attributes::new(Stretch::CONDENSED, Weight::BOLD, Style::Italic),
Synthesis {
vars: vec![],
Expand Down

0 comments on commit 6b4a05d

Please sign in to comment.