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
Notes: sideshowbarker 2024-07-19 01:45:55 +09:00
17 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ struct [[gnu::packed]] FontFileHeader
Font& Font::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) {
s_default_font = Font::load_from_file(default_font_path).leak_ref();
ASSERT(s_default_font);
@ -71,7 +71,7 @@ Font& Font::default_font()
Font& Font::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) {
s_default_fixed_width_font = Font::load_from_file(default_fixed_width_font_path).leak_ref();
ASSERT(s_default_fixed_width_font);
@ -82,7 +82,7 @@ Font& Font::default_fixed_width_font()
Font& Font::default_bold_fixed_width_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) {
font = Font::load_from_file(default_bold_fixed_width_font_path).leak_ref();
ASSERT(font);

View File

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