X11+xft-pango: have Fl::set_fonts() show fonts with black, light, medium, demi bold, oblique styles.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12398 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2017-08-25 15:33:05 +00:00
parent 475d2504bd
commit 9eeac9c737
1 changed files with 26 additions and 1 deletions

View File

@ -248,10 +248,21 @@ static void make_raw_name(char *raw, char *pretty)
case 'B':
if (strncasecmp(style, "Bold", 4) == 0)
{
mods |= BOLD;
if (!strstr(raw, " Demi Bold")) mods |= BOLD;
}
else if (strncasecmp(style, "Black", 5) == 0)
{
if (!strstr(raw, " Black")) strcat(raw, " Black");
}
goto NEXT_STYLE;
case 'D':
if (strncasecmp(style, "Demi Bold", 7) == 0)
{
if (!strstr(raw, " Demi Bold")) strcat(raw, " Demi Bold");
}
goto NEXT_STYLE;
case 'O':
if (strncasecmp(style, "Oblique", 7) == 0)
{
@ -265,6 +276,20 @@ static void make_raw_name(char *raw, char *pretty)
mods |= BOLD;
}
goto NEXT_STYLE;
case 'L':
if (strncasecmp(style, "Light", 5) == 0)
{
if (!strstr(raw, " Light")) strcat(raw, " Light");
}
goto NEXT_STYLE;
case 'M':
if (strncasecmp(style, "Medium", 6) == 0)
{
if (!strstr(raw, " Medium")) strcat(raw, " Medium");
}
goto NEXT_STYLE;
default: // find the next gap
goto NEXT_STYLE;