fix use of ...A( winapi functions for fonts.
This commit is contained in:
parent
90502e9792
commit
d126081ff3
1 changed files with 11 additions and 2 deletions
13
src/font.cpp
13
src/font.cpp
|
@ -31,6 +31,7 @@
|
|||
#include "serialization/parser.hpp"
|
||||
#include "serialization/preprocessor.hpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
#include "serialization/unicode.hpp"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
@ -367,7 +368,11 @@ void manager::init() const
|
|||
filesystem::get_files_in_dir(path, &files, NULL, filesystem::ENTIRE_FILE_PATH);
|
||||
BOOST_FOREACH(const std::string& file, files) {
|
||||
if(file.substr(file.length() - 4) == ".ttf" || file.substr(file.length() - 4) == ".ttc")
|
||||
AddFontResourceA(file.c_str());
|
||||
{
|
||||
utf16::string ufile = unicode_cast<utf16::string>(file);
|
||||
std::wstring wfile(ufile.begin(), ufile.end());
|
||||
AddFontResourceW(wfile.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -386,7 +391,11 @@ void manager::deinit() const
|
|||
filesystem::get_files_in_dir(path, &files, NULL, filesystem::ENTIRE_FILE_PATH);
|
||||
BOOST_FOREACH(const std::string& file, files) {
|
||||
if(file.substr(file.length() - 4) == ".ttf" || file.substr(file.length() - 4) == ".ttc")
|
||||
RemoveFontResourceA(file.c_str());
|
||||
{
|
||||
utf16::string ufile = unicode_cast<utf16::string>(file);
|
||||
std::wstring wfile(ufile.begin(), ufile.end());
|
||||
RemoveFontResourceW(wfile.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue