diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-06 16:32:59 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-06 16:32:59 +0000 |
commit | f3a77d3c00c095a53f37aa7efb39d56168799596 (patch) | |
tree | 0bd2269afe0edd5018c5d231c95a5011002c83cf /src/rufl_invalidate_cache.c | |
parent | 628079a91ca6d86a7915906d266e6fe5593bb846 (diff) | |
download | librufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.gz librufl-f3a77d3c00c095a53f37aa7efb39d56168799596.tar.bz2 |
Port to core buildsystem.
The python module (and associated make runes) need some love (as does non-GCC building with the core buildsystem in general)
svn path=/trunk/rufl/; revision=9792
Diffstat (limited to 'src/rufl_invalidate_cache.c')
-rw-r--r-- | src/rufl_invalidate_cache.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/rufl_invalidate_cache.c b/src/rufl_invalidate_cache.c new file mode 100644 index 0000000..65a3897 --- /dev/null +++ b/src/rufl_invalidate_cache.c @@ -0,0 +1,28 @@ +/* + * This file is part of RUfl + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license + * Copyright 2005 James Bursa <james@semichrome.net> + */ + +#include "oslib/font.h" +#include "rufl_internal.h" + + +/** + * Clear the internal font handle cache. + * + * Call this function on mode changes or output redirection changes. + */ + +void rufl_invalidate_cache(void) +{ + unsigned int i; + + for (i = 0; i != rufl_CACHE_SIZE; i++) { + if (rufl_cache[i].font != rufl_CACHE_NONE) { + xfont_lose_font(rufl_cache[i].f); + rufl_cache[i].font = rufl_CACHE_NONE; + } + } +} |