mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
Fix text measurement for non-italic text.
This commit is contained in:
parent
2bffcbbfcf
commit
26af1aa354
|
@ -80,7 +80,8 @@ namespace OpenTK.Graphics.Text
|
|||
{
|
||||
SetTextRenderingOptions(gfx, glyph.Font);
|
||||
|
||||
gfx.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, PointF.Empty, load_glyph_string_format);
|
||||
gfx.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, PointF.Empty,
|
||||
glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format);
|
||||
return bmp.Clone(FindEdges(bmp), System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||
}
|
||||
}
|
||||
|
@ -130,6 +131,10 @@ namespace OpenTK.Graphics.Text
|
|||
{
|
||||
// Todo: Parse layout options:
|
||||
StringFormat format = default_string_format;
|
||||
//if (block.Font.Style != FontStyle.Regular)
|
||||
// format = load_glyph_string_format;
|
||||
//else
|
||||
// format = default_string_format;
|
||||
|
||||
extents.Clear();
|
||||
|
||||
|
|
Loading…
Reference in a new issue