The last change neglected the first character which

has special treatment for its x0 setting but still
requires that the xAdvance be adjusted to account
for accumulated xOffset.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8473 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
PSp..om 13 years ago
parent ee2f44f340
commit 68c2fea479
  1. 12
      engine/src/core/com/jme3/font/LetterQuad.java

@ -291,6 +291,18 @@ class LetterQuad {
if (previous.isHead() || previous.eol) {
x0 = bound.x;
// The first letter quad will be drawn right at the first
// position... but it does not offset by the characters offset
// amount. This means that we've potentially accumulated extra
// pixels and the next letter won't get drawn far enough unless
// we add this offset back into xAdvance.. by subtracting it.
// This is the same thing that's done below because we've
// technically baked the offset in just like below. It doesn't
// look like it at first glance so I'm keeping it separate with
// this comment.
xAdvance -= xOffset * incrScale;
} else {
x0 = previous.getNextX() + xOffset * incrScale;

Loading…
Cancel
Save