Removed compiler warnings.
This commit is contained in:
parent
eb30294259
commit
7826a8a751
@ -124,9 +124,9 @@ void FTEnvironment::loadFont()
|
||||
if (screen_width < 1200) scale = std::max(0, screen_width - 640) / 750.0f;
|
||||
if (screen_width < 900 || screen_height < 700) scale = std::min(scale, 0.05f);
|
||||
|
||||
const u32 normal_dpi = ((0.7f + 0.2f*scale)*27);
|
||||
const u32 title_dpi = ((0.2f + 0.2f*scale)*120);
|
||||
const u32 digit_dpi = ((0.7f + 0.2f*scale)*40);
|
||||
const u32 normal_dpi = u32((0.7f + 0.2f*scale)*27);
|
||||
const u32 title_dpi = u32((0.2f + 0.2f*scale)*120);
|
||||
const u32 digit_dpi = u32((0.7f + 0.2f*scale)*40);
|
||||
|
||||
Log::info("Freetype Environment", "DPI for Normal Font is %d.", normal_dpi);
|
||||
Log::info("Freetype Environment", "DPI for Title Font is %d.", title_dpi);
|
||||
|
@ -878,27 +878,27 @@ void ScalableFont::doDraw(const core::stringw& text,
|
||||
if (charCollector == NULL)
|
||||
{
|
||||
//Try to use ceil to make offset calculate correctly when m_scale is smaller than 1
|
||||
s32 glyph_offset_x = ceil((float) area.bearingx*
|
||||
s32 glyph_offset_x = (s32)((float) area.bearingx*
|
||||
(fallback[i] ? m_scale*m_fallback_font_scale : m_scale));
|
||||
s32 glyph_offset_y = ceil((float) area.offsety*
|
||||
s32 glyph_offset_y = (s32)ceil((float) area.offsety*
|
||||
(fallback[i] ? m_scale*m_fallback_font_scale : m_scale));
|
||||
offset.X += glyph_offset_x;
|
||||
offset.Y += glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0); //Additional offset for digit text
|
||||
offset.Y += s32(glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0)); //Additional offset for digit text
|
||||
offsets.push_back(offset);
|
||||
offset.X -= glyph_offset_x;
|
||||
offset.Y -= glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0);
|
||||
offset.Y -= s32(glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0));
|
||||
}
|
||||
else //Billboard text specific
|
||||
{
|
||||
s32 glyph_offset_x = ceil((float) area.bearingx*
|
||||
s32 glyph_offset_x = (s32)ceil((float) area.bearingx*
|
||||
(fallback[i] ? m_scale*m_fallback_font_scale : m_scale));
|
||||
s32 glyph_offset_y = ceil((float) area.offsety_bt*
|
||||
s32 glyph_offset_y = (s32)ceil((float) area.offsety_bt*
|
||||
(fallback[i] ? m_scale*m_fallback_font_scale : m_scale));
|
||||
offset.X += glyph_offset_x;
|
||||
offset.Y += glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0); //Additional offset for digit text
|
||||
offset.Y += s32(glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0)); //Additional offset for digit text
|
||||
offsets.push_back(offset);
|
||||
offset.X -= glyph_offset_x;
|
||||
offset.Y -= glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0);
|
||||
offset.Y -= s32(glyph_offset_y + floor(m_type == T_DIGIT ? 20*m_scale : 0));
|
||||
}
|
||||
// Invisible character. add something to the array anyway so that
|
||||
// indices from the various arrays remain in sync
|
||||
|
Loading…
x
Reference in New Issue
Block a user