[DEV] compilation selection of the embended fonts

This commit is contained in:
Edouard DUPIN 2012-11-15 07:42:16 +01:00
parent de752fb642
commit d1615e3a77
4 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -42,6 +42,8 @@ namespace ewol
virtual int32_t GetHeight(int32_t fontSize) = 0;
virtual void GenerateKerning(int32_t fontSize, etk::Vector<ewol::GlyphProperty>& listGlyph) { };
virtual void Display(void) {};
};
};

View File

@ -235,6 +235,9 @@ void ewol::FontFreeType::GenerateKerning(int32_t fontSize, etk::Vector<ewol::Gly
if(false==m_init) {
return;
}
if ((FT_FACE_FLAG_KERNING & m_fftFace->face_flags) == 0) {
EWOL_INFO("No kerning generation (Disable) in the font");
}
// 300dpi (hight quality) 96 dpi (normal quality)
int32_t fontQuality = 96;
// Select Size ...

View File

@ -84,7 +84,15 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
// find the real Font name :
etk::Vector<etk::UString> 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; iii<output.Size(); iii++) {
//EWOL_DEBUG(" file : " << output[iii]);
@ -211,6 +219,7 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
}
}
//m_font[iiiFontId]->Display();
// generate the kerning for all the characters :
m_font[iiiFontId]->GenerateKerning(m_size, m_listElement[iiiFontId]);
}