Now use the new MeasureText function.
This commit is contained in:
parent
c0803a2e03
commit
a52666d9e6
1 changed files with 3 additions and 2 deletions
|
@ -37,6 +37,8 @@ namespace OpenTK.Graphics
|
|||
// Interleaved, vertex, texcoord, vertex, etc... Starts with 8 chars, will expand as needed.
|
||||
Vector2[] vertices = new Vector2[8 * 8];
|
||||
ushort[] indices = new ushort[6 * 8];
|
||||
IList<RectangleF> ranges = new List<RectangleF>();
|
||||
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
|
@ -206,8 +208,7 @@ namespace OpenTK.Graphics
|
|||
|
||||
if (alignment == StringAlignment.Near && !rightToLeft || alignment == StringAlignment.Far && rightToLeft)
|
||||
{
|
||||
ICollection<RectangleF> ranges = new List<RectangleF>();
|
||||
font.MeasureCharacterRanges(text, ref ranges);
|
||||
font.MeasureText(text, SizeF.Empty, null, ranges);
|
||||
|
||||
int current = 0;
|
||||
//foreach (char c in text)
|
||||
|
|
Loading…
Reference in a new issue