1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

(font_style_to_value): Set value for unknown symbols to

100 instead of 255.
(weight_table, slant_table, width_table): Treat "unspecified" as the
default value.
This commit is contained in:
Chong Yidong 2009-02-27 00:29:42 +00:00
parent caf8d60ccd
commit c2694a0642

View File

@ -96,7 +96,7 @@ static struct table_entry weight_table[] =
{ 40, { "extra-light", "extralight" }},
{ 50, { "light" }},
{ 75, { "semi-light", "semilight", "demilight", "book" }},
{ 100, { "normal", "medium", "regular" }},
{ 100, { "normal", "medium", "regular", "unspecified" }},
{ 180, { "semi-bold", "semibold", "demibold", "demi" }},
{ 200, { "bold" }},
{ 205, { "extra-bold", "extrabold" }},
@ -110,7 +110,7 @@ static struct table_entry slant_table[] =
{
{ 0, { "reverse-oblique", "ro" }},
{ 10, { "reverse-italic", "ri" }},
{ 100, { "normal", "r" }},
{ 100, { "normal", "r", "unspecified" }},
{ 200, { "italic" ,"i", "ot" }},
{ 210, { "oblique", "o" }}
};
@ -124,7 +124,7 @@ static struct table_entry width_table[] =
{ 63, { "extra-condensed", "extracondensed" }},
{ 75, { "condensed", "compressed", "narrow" }},
{ 87, { "semi-condensed", "semicondensed", "demicondensed" }},
{ 100, { "normal", "medium", "regular" }},
{ 100, { "normal", "medium", "regular", "unspecified" }},
{ 113, { "semi-expanded", "semiexpanded", "demiexpanded" }},
{ 125, { "expanded" }},
{ 150, { "extra-expanded", "extraexpanded" }},
@ -360,12 +360,12 @@ font_style_to_value (prop, val, noerror)
return -1;
if (len == 255)
abort ();
elt = Fmake_vector (make_number (2), make_number (255));
elt = Fmake_vector (make_number (2), make_number (100));
ASET (elt, 1, val);
args[0] = table;
args[1] = Fmake_vector (make_number (1), elt);
ASET (font_style_table, prop - FONT_WEIGHT_INDEX, Fvconcat (2, args));
return (255 << 8) | (i << 4);
return (100 << 8) | (i << 4);
}
else
{