prefer to fake italic over faking bold
This commit is contained in:
parent
85fb758bde
commit
def0af0e4b
1 changed files with 22 additions and 4 deletions
|
|
@ -1499,13 +1499,13 @@ static TTF_Font *getfonthandle(int desire)
|
|||
char *name = fi->filename[text_state];
|
||||
if(!name)
|
||||
{
|
||||
name = fi->filename[text_state ^ TTF_STYLE_BOLD];
|
||||
missing = text_state & TTF_STYLE_BOLD;
|
||||
name = fi->filename[text_state ^ TTF_STYLE_ITALIC];
|
||||
missing = text_state & TTF_STYLE_ITALIC;
|
||||
}
|
||||
if(!name)
|
||||
{
|
||||
name = fi->filename[text_state ^ TTF_STYLE_ITALIC];
|
||||
missing = text_state & TTF_STYLE_ITALIC;
|
||||
name = fi->filename[text_state ^ TTF_STYLE_BOLD];
|
||||
missing = text_state & TTF_STYLE_BOLD;
|
||||
}
|
||||
if(!name)
|
||||
{
|
||||
|
|
@ -1816,6 +1816,24 @@ printf(" %s\n", base[i]->style);
|
|||
fi->filename[spot] = strdup(base[i]->filename);
|
||||
fi->score += 2;
|
||||
}
|
||||
if(!fi->filename[0] && !fi->filename[1])
|
||||
{
|
||||
fi->filename[0] = fi->filename[2];
|
||||
fi->filename[2] = NULL;
|
||||
fi->filename[1] = fi->filename[3];
|
||||
fi->filename[3] = NULL;
|
||||
}
|
||||
if(!fi->filename[0] && !fi->filename[2])
|
||||
{
|
||||
fi->filename[0] = fi->filename[1];
|
||||
fi->filename[1] = NULL;
|
||||
fi->filename[2] = fi->filename[3];
|
||||
fi->filename[3] = NULL;
|
||||
}
|
||||
if(!fi->filename[0])
|
||||
{
|
||||
fi->filename[0] = strdup(fi->filename[TTF_STYLE_BOLD]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue