From c9b616014fee75c60824819f78eb8e7ff247439e Mon Sep 17 00:00:00 2001 From: dongie Date: Sun, 2 Oct 2016 23:33:28 +0900 Subject: Added build files for mcufont on Windows, using Visual Studio 2015. Corrected opening .ttf/.bdf files in BINARY mode (which has an effect on Win32, no change on other platforms). Added progress report to import_ttf as with a large font file, it may take several minutes. --- tools/mcufontencoder/src/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/mcufontencoder/src/main.cc') diff --git a/tools/mcufontencoder/src/main.cc b/tools/mcufontencoder/src/main.cc index 19c9c6f7..70cd9132 100644 --- a/tools/mcufontencoder/src/main.cc +++ b/tools/mcufontencoder/src/main.cc @@ -90,7 +90,7 @@ static status_t cmd_import_ttf(const std::vector &args) int size = std::stoi(args.at(2)); bool bw = (args.size() == 4 && args.at(3) == "bw"); std::string dest = strip_extension(src) + std::to_string(size) + (bw ? "bw" : "") + ".dat"; - std::ifstream infile(src); + std::ifstream infile(src, std::ios::binary); if (!infile.good()) { @@ -118,7 +118,7 @@ static status_t cmd_import_bdf(const std::vector &args) std::string src = args.at(1); std::string dest = strip_extension(args.at(1)) + ".dat"; - std::ifstream infile(src); + std::ifstream infile(src, std::ios::binary); if (!infile.good()) { -- cgit v1.2.3