diff --git a/sources/Config.in b/sources/Config.in index f6b2bd62..6063a710 100644 --- a/sources/Config.in +++ b/sources/Config.in @@ -6,4 +6,12 @@ menu "General" help This is the application Title + config __EWOL_INTEGRATED_FONT__ + prompt "Integrate Font in the appl data" + bool + default y + help + By default the application seach the font in the system folder. + If enable the system seach the font in the "DATA:fonts" folder. + endmenu diff --git a/sources/ewol/font/Font.h b/sources/ewol/font/Font.h index 3428a117..4b97d2b7 100644 --- a/sources/ewol/font/Font.h +++ b/sources/ewol/font/Font.h @@ -42,6 +42,8 @@ namespace ewol virtual int32_t GetHeight(int32_t fontSize) = 0; virtual void GenerateKerning(int32_t fontSize, etk::Vector& listGlyph) { }; + + virtual void Display(void) {}; }; }; diff --git a/sources/ewol/font/FontFreeType.cpp b/sources/ewol/font/FontFreeType.cpp index c91e7f78..7277ec55 100644 --- a/sources/ewol/font/FontFreeType.cpp +++ b/sources/ewol/font/FontFreeType.cpp @@ -235,6 +235,9 @@ void ewol::FontFreeType::GenerateKerning(int32_t fontSize, etk::Vectorface_flags) == 0) { + EWOL_INFO("No kerning generation (Disable) in the font"); + } // 300dpi (hight quality) 96 dpi (normal quality) int32_t fontQuality = 96; // Select Size ... diff --git a/sources/ewol/font/TexturedFont.cpp b/sources/ewol/font/TexturedFont.cpp index 9b8b1e7a..e3cf083e 100644 --- a/sources/ewol/font/TexturedFont.cpp +++ b/sources/ewol/font/TexturedFont.cpp @@ -84,7 +84,15 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) : // find the real Font name : etk::Vector output; - etk::FSNode myFolder("/usr/share/fonts/truetype"); + #ifdef __EWOL_INTEGRATED_FONT__ + etk::FSNode myFolder("DATA:fonts"); + #else + #if defined(__TARGET_OS__Android) + etk::FSNode myFolder("/system/font"); + #elif defined(__TARGET_OS__Linux) + etk::FSNode myFolder("/usr/share/fonts/truetype"); + #endif + #endif myFolder.FolderGetRecursiveFiles(output); for (int32_t iii=0; iiiDisplay(); // generate the kerning for all the characters : m_font[iiiFontId]->GenerateKerning(m_size, m_listElement[iiiFontId]); }