1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:45:07 +00:00

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.
This commit is contained in:
Andreas Kling 2020-10-24 16:27:44 +02:00
parent 688675e89b
commit 5abc03db0d
17 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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 {