mirror of https://github.com/buggins/dlangui.git
Merge pull request #163 from g4z3r/master
fix crash when change font settings
This commit is contained in:
commit
e18506dfed
|
@ -646,7 +646,7 @@ class FreeTypeFontManager : FontManager {
|
||||||
bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0, bool dontLoadFile = false) {
|
bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0, bool dontLoadFile = false) {
|
||||||
if (_library is null)
|
if (_library is null)
|
||||||
return false;
|
return false;
|
||||||
Log.v("FreeTypeFontManager.registerFont ", filename, " ", family, " ", face, " italic=", italic, " weight=", weight);
|
//Log.v("FreeTypeFontManager.registerFont ", filename, " ", family, " ", face, " italic=", italic, " weight=", weight);
|
||||||
if (!exists(filename) || !isFile(filename)) {
|
if (!exists(filename) || !isFile(filename)) {
|
||||||
Log.d("Font file ", filename, " not found");
|
Log.d("Font file ", filename, " not found");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -412,7 +412,7 @@ private abstract class GLCache
|
||||||
_activePage = null;
|
_activePage = null;
|
||||||
foreach(i; 0 .. _pages.length)
|
foreach(i; 0 .. _pages.length)
|
||||||
if (_pages[i] == page) {
|
if (_pages[i] == page) {
|
||||||
_pages.remove(i);
|
_pages = _pages.remove(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
destroy(page);
|
destroy(page);
|
||||||
|
|
Loading…
Reference in New Issue