diff --git a/uppsrc/Core/heaputil.cpp b/uppsrc/Core/heaputil.cpp index b55dcc01a..8c2339d32 100644 --- a/uppsrc/Core/heaputil.cpp +++ b/uppsrc/Core/heaputil.cpp @@ -332,7 +332,7 @@ EXITBLOCK { if(bigstat) { total += bigstat; VppLog() << Sprintf(">64KB %8dx %2d%%, total %8dx %2d%%\n", - bigstat, 100 * bigstat / sum, total, 100 * total / sum); + bigstat, 100 * bigstat / sum, total, 100 * total / sum); } } #endif diff --git a/uppsrc/CtrlLib/ChGtk.cpp b/uppsrc/CtrlLib/ChGtk.cpp index 3d5c8d830..d98b8030a 100644 --- a/uppsrc/CtrlLib/ChGtk.cpp +++ b/uppsrc/CtrlLib/ChGtk.cpp @@ -149,8 +149,6 @@ void ChHostSkin() Font::SetDefaultFont(Font(fontname, (fontheight * xdpi + 512*72) / (1024*72)) .Bold(bold).Italic(italic)); - ClearFtFaceCache(); - ColoredOverride(CtrlsImg::Iml(), CtrlsImg::Iml()); int classiq = engine == "Redmond" || engine == "Raleigh" || engine == "Glider" || engine == "Simple"; @@ -698,8 +696,6 @@ void ChHostSkin() GUI_AltAccessKeys_Write(1); GUI_AKD_Conservative_Write(0); - ClearFtFaceCache(); - CurrentSoundTheme = GtkStyleString("gtk-sound-theme-name"); } diff --git a/uppsrc/Draw/FontFc.cpp b/uppsrc/Draw/FontFc.cpp index a70fb6da5..28c82daf4 100644 --- a/uppsrc/Draw/FontFc.cpp +++ b/uppsrc/Draw/FontFc.cpp @@ -17,7 +17,7 @@ NAMESPACE_UPP static FT_Library sFTlib; -EXITBLOCK +EXITBLOCK { if(sFTlib) FT_Done_FreeType(sFTlib); @@ -89,14 +89,6 @@ struct FtFaceEntry { String path; }; -static FtFaceEntry ft_cache[FONTCACHE]; - -void ClearFtFaceCache() -{ - for(int i = 0; i < FONTCACHE; i++) - ft_cache[i].font.Height(-30000); -} - FT_Face (*FTFaceXft)(Font fnt, String *rpath); FT_Face FTFace(Font fnt, String *rpath = NULL) @@ -104,8 +96,10 @@ FT_Face FTFace(Font fnt, String *rpath = NULL) LTIMING("FTFace"); if(FTFaceXft) return (*FTFaceXft)(fnt, rpath); + static FtFaceEntry ft_cache[FONTCACHE]; ONCELOCK { - ClearFtFaceCache(); + for(int i = 0; i < FONTCACHE; i++) + ft_cache[i].font.Height(-30000); } FtFaceEntry be; be = ft_cache[0];