fontrenderer: Rework rendering for better font presentation

- For the correct use of the changes should be built freetype
   with the following settings:
     #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     #define TT_CONFIG_OPTION_SUBPIXEL_HINTING

BS-Patch for freetype 2.5-2.7
-----------------------------
** include/freetype/config/ftoption.h **

-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING

-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING

BS-Patch for freetype 2.7.1
---------------------------
** include/freetype/config/ftoption.h **

-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
This commit is contained in:
M. Liebmann
2017-01-24 22:33:20 +01:00
parent 4a288240f2
commit 97d1d93c93
3 changed files with 79 additions and 87 deletions

View File

@@ -716,7 +716,7 @@ void CTextBox::refreshText(void)
frameBuffer->paintBoxRel(tx, ty-th, tw, th, COL_RED, m_nBgRadius, m_nBgRadiusType);
#endif
//TRACE("[CTextBox] %s Line %d m_cFrame.iX %d m_cFrameTextRel.iX %d\r\n", __FUNCTION__, __LINE__, m_cFrame.iX, m_cFrameTextRel.iX);
m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, (m_renderMode | m_utf8_encoded) ? Font::IS_UTF8 : 0);
m_pcFontText->RenderString(tx, ty, tw, m_cLineArray[i].c_str(), m_textColor, 0, m_renderMode | ((m_utf8_encoded) ? Font::IS_UTF8 : 0));
m_old_cText = m_cText;
y += m_nFontTextHeight;
}