Do not render text that doesn't fit inside the clip rectangle. Fixes bug [#847]: "TextPrinter layout when width, height are zero." (http://www.opentk.com/node/847).
This commit is contained in:
parent
7244b80332
commit
88f1ce081f
1 changed files with 2 additions and 1 deletions
|
@ -89,7 +89,8 @@ namespace OpenTK.Graphics.Text
|
|||
int current = 0;
|
||||
foreach (Glyph glyph in block)
|
||||
{
|
||||
if (glyph.IsWhiteSpace)
|
||||
// Do not render whitespace characters or characters outside the clip rectangle.
|
||||
if (glyph.IsWhiteSpace || extents[current].Width == 0 || extents[current].Height == 0)
|
||||
{
|
||||
current++;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue