diff --git a/OpenRA.Game/Graphics/SpriteFont.cs b/OpenRA.Game/Graphics/SpriteFont.cs index 2d3f055991..5fb8a8e7c5 100644 --- a/OpenRA.Game/Graphics/SpriteFont.cs +++ b/OpenRA.Game/Graphics/SpriteFont.cs @@ -80,17 +80,20 @@ namespace OpenRA.Graphics GlyphInfo CreateGlyph(Pair c) { var index = FT.FT_Get_Char_Index(face, (uint)c.First); - FT.FT_Load_Glyph(face, index, FT.FT_LOAD_RENDER); + if (0 != FT.FT_Load_Glyph(face, index, FT.FT_LOAD_RENDER)) + throw new InvalidOperationException( "FT_Load_Glyph failed." ); var _face = (FT_FaceRec)Marshal.PtrToStructure(face, typeof(FT_FaceRec)); var _glyph = (FT_GlyphSlotRec)Marshal.PtrToStructure(_face.glyph, typeof(FT_GlyphSlotRec)); - var s = builder.Allocate(new Size(_glyph.metrics.width >> 6, _glyph.metrics.height >> 6)); + var s = builder.Allocate( + new Size(_glyph.metrics.width.ToInt32() >> 6, + _glyph.metrics.height.ToInt32() >> 6)); var g = new GlyphInfo { Sprite = s, - Advance = _glyph.metrics.horiAdvance / 64f, + Advance = _glyph.metrics.horiAdvance.ToInt32() / 64f, Offset = { X = _glyph.bitmap_left, Y = -_glyph.bitmap_top } }; diff --git a/thirdparty/Tao/Tao.FreeType.dll b/thirdparty/Tao/Tao.FreeType.dll index 15ccb306d2..a07e35673b 100755 Binary files a/thirdparty/Tao/Tao.FreeType.dll and b/thirdparty/Tao/Tao.FreeType.dll differ