From 4d6cc61ec1dbbe495be87679ae73ec3e1892c3a4 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 25 Jul 2013 13:23:03 +0100 Subject: [PATCH] + restore family-name + style key --- src/font_engine_freetype.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index 0a7a89b0a..2078ef4f9 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -104,7 +104,8 @@ bool freetype_engine::register_font(std::string const& file_name) // some font files have multiple fonts in a file // the count is in the 'root' face library[0] // see the FT_FaceRec in freetype.h - for ( int i = 0; face == 0 || i < num_faces; i++ ) { + for ( int i = 0; face == 0 || i < num_faces; i++ ) + { // if face is null then this is the first face error = FT_New_Face (library,file_name.c_str(),i,&face); if (error) @@ -118,7 +119,7 @@ bool freetype_engine::register_font(std::string const& file_name) // http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_FaceRec if (face->family_name && face->style_name) { - std::string name = std::string(face->family_name) + "-" + std::string(face->style_name); + std::string name = std::string(face->family_name) + " " + std::string(face->style_name); // skip fonts with leading . in the name if (!boost::algorithm::starts_with(name,".")) {