mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
Draw: Simplified variant of Font::SetFace
git-svn-id: svn://ultimatepp.org/upp/trunk@7267 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
41d0431465
commit
f00a4afc29
2 changed files with 8 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ public:
|
|||
static int FindFaceNameIndex(const String& name);
|
||||
static dword GetFaceInfo(int index);
|
||||
static void SetFace(int index, const String& name, dword info);
|
||||
static void SetFace(int index, const String& name);
|
||||
|
||||
static void SetDefaultFont(Font font);
|
||||
static void SetStdFont(Font font);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,13 @@ void Font::SetFace(int index, const String& name, dword info)
|
|||
f.info = info;
|
||||
}
|
||||
|
||||
void Font::SetFace(int index, const String& name)
|
||||
{
|
||||
int q = FindFaceNameIndex(name);
|
||||
q = q >= 0 ? GetFaceInfo(q) : 0;
|
||||
SetFace(index, name, q);
|
||||
}
|
||||
|
||||
int FontFilter(int c)
|
||||
{
|
||||
return c >= 'a' && c <= 'z' || c >= '0' && c <= '9' ? c : c >= 'A' && c <= 'Z' ? ToLower(c) : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue