From: <geo...@us...> - 2012-08-25 19:21:45
|
Revision: 5167 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=5167&view=rev Author: geoffthemedio Date: 2012-08-25 19:21:37 +0000 (Sat, 25 Aug 2012) Log Message: ----------- Patch by zhur that seemingly fixes the font artefacts issue seen mostly commonly with non-Latin text. Modified Paths: -------------- trunk/FreeOrion/GG/src/Font.cpp Modified: trunk/FreeOrion/GG/src/Font.cpp =================================================================== --- trunk/FreeOrion/GG/src/Font.cpp 2012-08-25 11:46:49 UTC (rev 5166) +++ trunk/FreeOrion/GG/src/Font.cpp 2012-08-25 19:21:37 UTC (rev 5167) @@ -1260,7 +1260,7 @@ std::vector<Pt> buffer_sizes; std::map<boost::uint32_t, TempGlyphData> temp_glyph_data; boost::uint16_t* temp_buf = new boost::uint16_t[BUF_SZ]; // 16 bpp: we are creating a luminance + alpha image - std::memset(temp_buf, 0, BUF_SZ); + std::memset(temp_buf, 0, BUF_SZ * sizeof(boost::uint16_t)); buffer_vec.push_back(temp_buf); buffer_sizes.push_back(Pt(BUF_WIDTH, BUF_HEIGHT)); @@ -1291,7 +1291,7 @@ x = X0; y = Y0; temp_buf = new boost::uint16_t[BUF_SZ]; - std::memset(temp_buf, 0, BUF_SZ); + std::memset(temp_buf, 0, BUF_SZ * sizeof(boost::uint16_t)); buffer_vec.push_back(temp_buf); buffer_sizes.push_back(Pt(BUF_WIDTH, BUF_HEIGHT)); } |