Font: remove old workaround for light weight fonts

Testing now, pango weight markup correctly works with the Lato weight variant files present and breaks with them missing. Seems the issue I documented back in 2018 is noo longer the case, and thus we don't need this workaround.
This commit is contained in:
Charles Dang 2025-03-11 21:45:51 -04:00
parent dc5e0d62c4
commit 987004d09c
4 changed files with 0 additions and 24 deletions

View File

@ -15,18 +15,7 @@
# where a comma seperated list of fonts will result in newlines not being
# rendered and font space metrics being off on Windows.
#
# Additionally, despite what one might assume, "Lato" doesn't appear to
# load all Lato font variants (it has a bunch of different weight ones).
# I had thought one could specify different weights and Pango would
# automatically use the variant for that weight, but no dice. Instead, we
# need to set the weight variant we want as the distired font familt at
# render time. Right now we only have use of a "light" variant, but others
# could be added at some point.
#
# -- vultraz, 2018-02-14
#
family_order= _ "Lato"
family_order_monospace= _ "DejaVu Sans Mono"
family_order_light= _ "Lato Light"
family_order_script = _ "Oldania ADF Std"
[/fonts]

View File

@ -7,7 +7,6 @@
min=1
max=1
{REQUIRED_KEY family_order t_string}
{REQUIRED_KEY family_order_light t_string}
{REQUIRED_KEY family_order_monospace t_string}
{REQUIRED_KEY family_order_script t_string}
[/tag]

View File

@ -46,7 +46,6 @@ namespace
t_string family_order_sans;
t_string family_order_mono;
t_string family_order_light;
t_string family_order_script;
} // end anon namespace
@ -78,7 +77,6 @@ bool load_font_config()
family_order_sans = fonts_config["family_order"];
family_order_mono = fonts_config["family_order_monospace"];
family_order_light = fonts_config["family_order_light"];
family_order_script = fonts_config["family_order_script"];
if(family_order_mono.empty()) {
@ -86,11 +84,6 @@ bool load_font_config()
family_order_mono = family_order_sans;
}
if(family_order_light.empty()) {
ERR_FT << "No light font family order defined, falling back to sans serif order";
family_order_light = family_order_sans;
}
if(family_order_script.empty()) {
ERR_FT << "No script font family order defined, falling back to sans serif order";
family_order_script = family_order_sans;
@ -104,8 +97,6 @@ const t_string& get_font_families(family_class fclass)
switch(fclass) {
case FONT_MONOSPACE:
return family_order_mono;
case FONT_LIGHT:
return family_order_light;
case FONT_SCRIPT:
return family_order_script;
default:

View File

@ -27,7 +27,6 @@ enum family_class
{
FONT_SANS_SERIF,
FONT_MONOSPACE,
FONT_LIGHT,
FONT_SCRIPT,
};
@ -35,8 +34,6 @@ inline family_class str_to_family_class(const std::string& str)
{
if(str == "monospace") {
return FONT_MONOSPACE;
} else if(str == "light") {
return FONT_LIGHT;
} else if(str == "script") {
return FONT_SCRIPT;
}