Browse Source

Fonts: Rename font files consistently

Font files are now all named like this:

    <Family><Weight><Size>.font

This will make it much easier/sane to perform font lookup.
Andreas Kling 4 years ago
parent
commit
5abc03d

+ 0 - 0
Base/res/fonts/CsillaBold7x10.font → Base/res/fonts/CsillaBold10.font


+ 0 - 0
Base/res/fonts/CsillaThin7x10.font → Base/res/fonts/CsillaRegular10.font


+ 0 - 0
Base/res/fonts/Csilla12.font → Base/res/fonts/CsillaRegular12.font


+ 0 - 0
Base/res/fonts/Katica10.font → Base/res/fonts/KaticaRegular10.font


+ 0 - 0
Base/res/fonts/Katica12.font → Base/res/fonts/KaticaRegular12.font


+ 0 - 0
Base/res/fonts/LizaBold8x10.font → Base/res/fonts/LizaBlack10.font


+ 0 - 0
Base/res/fonts/LizaBold18x24.font → Base/res/fonts/LizaBlack24.font


+ 0 - 0
Base/res/fonts/LizaBold26x36.font → Base/res/fonts/LizaBlack36.font


+ 0 - 0
Base/res/fonts/LizaRegular8x10.font → Base/res/fonts/LizaBold10.font


+ 0 - 0
Base/res/fonts/LizaRegular18x24.font → Base/res/fonts/LizaBold24.font


+ 0 - 0
Base/res/fonts/LizaRegular26x36.font → Base/res/fonts/LizaBold36.font


+ 0 - 0
Base/res/fonts/LizaThin8x10.font → Base/res/fonts/LizaRegular10.font


+ 0 - 0
Base/res/fonts/LizaThin18x24.font → Base/res/fonts/LizaRegular24.font


+ 0 - 0
Base/res/fonts/LizaThin26x36.font → Base/res/fonts/LizaRegular36.font


+ 0 - 0
Base/res/fonts/Pebbleton14.font → Base/res/fonts/PebbletonRegular14.font


+ 3 - 3
Libraries/LibGfx/Font.cpp

@@ -60,7 +60,7 @@ struct [[gnu::packed]] FontFileHeader
 Font& Font::default_font()
 Font& Font::default_font()
 {
 {
     static Font* s_default_font;
     static Font* s_default_font;
-    static const char* default_font_path = "/res/fonts/Katica10.font";
+    static const char* default_font_path = "/res/fonts/KaticaRegular10.font";
     if (!s_default_font) {
     if (!s_default_font) {
         s_default_font = Font::load_from_file(default_font_path).leak_ref();
         s_default_font = Font::load_from_file(default_font_path).leak_ref();
         ASSERT(s_default_font);
         ASSERT(s_default_font);
@@ -71,7 +71,7 @@ Font& Font::default_font()
 Font& Font::default_fixed_width_font()
 Font& Font::default_fixed_width_font()
 {
 {
     static Font* s_default_fixed_width_font;
     static Font* s_default_fixed_width_font;
-    static const char* default_fixed_width_font_path = "/res/fonts/CsillaThin7x10.font";
+    static const char* default_fixed_width_font_path = "/res/fonts/CsillaRegular10.font";
     if (!s_default_fixed_width_font) {
     if (!s_default_fixed_width_font) {
         s_default_fixed_width_font = Font::load_from_file(default_fixed_width_font_path).leak_ref();
         s_default_fixed_width_font = Font::load_from_file(default_fixed_width_font_path).leak_ref();
         ASSERT(s_default_fixed_width_font);
         ASSERT(s_default_fixed_width_font);
@@ -82,7 +82,7 @@ Font& Font::default_fixed_width_font()
 Font& Font::default_bold_fixed_width_font()
 Font& Font::default_bold_fixed_width_font()
 {
 {
     static Font* font;
     static Font* font;
-    static const char* default_bold_fixed_width_font_path = "/res/fonts/CsillaBold7x10.font";
+    static const char* default_bold_fixed_width_font_path = "/res/fonts/CsillaBold10.font";
     if (!font) {
     if (!font) {
         font = Font::load_from_file(default_bold_fixed_width_font_path).leak_ref();
         font = Font::load_from_file(default_bold_fixed_width_font_path).leak_ref();
         ASSERT(font);
         ASSERT(font);

+ 1 - 1
Libraries/LibWeb/CSS/StyleProperties.cpp

@@ -116,7 +116,7 @@ void StyleProperties::load_font() const
     if (font_weight == "lighter")
     if (font_weight == "lighter")
         weight = "Thin";
         weight = "Thin";
     else if (font_weight == "normal")
     else if (font_weight == "normal")
-        weight = "";
+        weight = "Regular";
     else if (font_weight == "bold")
     else if (font_weight == "bold")
         weight = "Bold";
         weight = "Bold";
     else {
     else {