mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Draw: InvalidateFontList
git-svn-id: svn://ultimatepp.org/upp/trunk@6271 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c64d144719
commit
dec1c3cebd
2 changed files with 14 additions and 6 deletions
|
|
@ -18,15 +18,21 @@ INITBLOCK {
|
|||
Value::Register<Font>("Font");
|
||||
}
|
||||
|
||||
static bool sListValid;
|
||||
|
||||
void InvalidateFontList()
|
||||
{
|
||||
sListValid = false;
|
||||
}
|
||||
|
||||
const Vector<FaceInfo>& Font::List()
|
||||
{
|
||||
static Vector<FaceInfo> *q;
|
||||
ONCELOCK {
|
||||
static Vector<FaceInfo> x;
|
||||
x = GetAllFacesSys();
|
||||
q = &x;
|
||||
static Vector<FaceInfo> list;
|
||||
if(!sListValid) {
|
||||
Set__(sListValid);
|
||||
list = GetAllFacesSys();
|
||||
}
|
||||
return *q;
|
||||
return list;
|
||||
}
|
||||
|
||||
void sInitFonts()
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ const CommonFontInfo& GetFontInfo(Font font);
|
|||
bool IsNormal(Font font, int chr);
|
||||
void GlyphMetrics(GlyphInfo& f, Font font, int chr);
|
||||
|
||||
void InvalidateFontList();
|
||||
|
||||
// Platform specific font interface
|
||||
|
||||
CommonFontInfo GetFontInfoSys(Font font);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue