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/freetype_import.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tools/mcufontencoder/src/freetype_import.cc') diff --git a/tools/mcufontencoder/src/freetype_import.cc b/tools/mcufontencoder/src/freetype_import.cc index 27a0734d..07a9cde5 100644 --- a/tools/mcufontencoder/src/freetype_import.cc +++ b/tools/mcufontencoder/src/freetype_import.cc @@ -163,14 +163,22 @@ std::unique_ptr LoadFreetype(std::istream &file, int size, bool bw) glyphtable.push_back(glyph); charcode = FT_Get_Next_Char(face, charcode, &gindex); + if (gindex % 1000 == 0) + std::cout << "."; } - + + std::cout << "\nEliminating duplicates (this may take a while)..."; + eliminate_duplicates(glyphtable); - crop_glyphs(glyphtable, fontinfo); - detect_flags(glyphtable, fontinfo); + std::cout << "\nCropping glyphs..."; + crop_glyphs(glyphtable, fontinfo); + std::cout << "\nDetecting flags..."; + detect_flags(glyphtable, fontinfo); - std::unique_ptr result(new DataFile( + std::cout << "\nGenerating datafile..."; + std::unique_ptr result(new DataFile( dictionary, glyphtable, fontinfo)); + std::cout << "\n"; return result; } -- cgit v1.2.3