Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types.

This commit is contained in:
Robert Rouhani
2015-03-20 23:51:24 -04:00
parent bc7fd81297
commit 4987a6b24c
4 changed files with 14 additions and 29 deletions

View File

@@ -102,13 +102,13 @@ namespace OpenRA.Graphics
face.LoadChar(c.First, LoadFlags.Default, LoadTarget.Normal);
face.Glyph.RenderGlyph(RenderMode.Normal);
var size = new Size((int)face.Glyph.Metrics.Width >> 6, (int)face.Glyph.Metrics.Height >> 6);
var size = new Size((int)face.Glyph.Metrics.Width, (int)face.Glyph.Metrics.Height);
var s = builder.Allocate(size);
var g = new GlyphInfo
{
Sprite = s,
Advance = (int)face.Glyph.Metrics.HorizontalAdvance / 64f,
Advance = (float)face.Glyph.Metrics.HorizontalAdvance,
Offset = new int2(face.Glyph.BitmapLeft, -face.Glyph.BitmapTop)
};