QuickFont.QFont.SkipTrailingSpace C# (CSharp) Method

SkipTrailingSpace() private method

Checks whether to skip trailing space on line because the next word does not fit. We only check one space - the assumption is that if there is more than one, it is a deliberate attempt to insert spaces.
private SkipTrailingSpace ( TextNode node, float lengthSoFar, float boundWidth ) : bool
node TextNode
lengthSoFar float
boundWidth float
return bool
        private bool SkipTrailingSpace(TextNode node, float lengthSoFar, float boundWidth)
        {
            if (node.Type == TextNodeType.Space && node.Next != null && node.Next.Type == TextNodeType.Word && node.ModifiedLength + node.Next.ModifiedLength + lengthSoFar > boundWidth)
            {
                return true;
            }

            return false;
        }