summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-04-14 14:35:50 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-04-14 14:48:29 +0200
commita32c3bcafd50de5be8e1f43f9b6013dfc32d04f3 (patch)
tree74c84e06c04c481537afbb8fcaab2185148e0def /crawl-ref/source/files.h
parent9f0dde9167be6cefe9814699d69d567ae9acb695 (diff)
downloadcrawl-ref-a32c3bcafd50de5be8e1f43f9b6013dfc32d04f3.tar.gz
crawl-ref-a32c3bcafd50de5be8e1f43f9b6013dfc32d04f3.zip
Work around FreeType having problems opening files on Windows.
According to its documentation, FT_New_Face() expects the file's name in UTF-8 regardless of the system locale. Too bad, there's a bug where sometimes on Windows an 8 bit code page is used instead: http://www.mail-archive.com/freetype@nongnu.org/msg00939.html Since we don't know if the version we're talking to is fixed or not, it's safer to load the font file ourselves. This fixes cases where zipped (not installed) builds were put into a directory with a non-ASCII name.
Diffstat (limited to 'crawl-ref/source/files.h')
-rw-r--r--crawl-ref/source/files.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h
index 4b0aa917b2..fc7e29c5c4 100644
--- a/crawl-ref/source/files.h
+++ b/crawl-ref/source/files.h
@@ -34,6 +34,7 @@ bool dir_exists(const std::string &dir);
bool is_absolute_path(const std::string &path);
bool is_read_safe_path(const std::string &path);
void assert_read_safe_path(const std::string &path) throw (std::string);
+unsigned long file_size(FILE *handle);
std::vector<std::string> get_dir_files(const std::string &dir);
std::vector<std::string> get_dir_files_ext(const std::string &dir,