Skip to content

Commit 30c4415

Browse files
committed
Fix for Missing Glyphs
The getGlyphs(StringBuilder) method incorrectly referenced the member variable 'sb' rather than the local variable 'text' when assembling an array of Glyphs.
1 parent 36971ea commit 30c4415

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/com/atr/jme/font/TrueTypeBMP.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ public TrueTypeContainer getFormattedText(StringContainer stringContainer,
206206

207207
@Override
208208
public T[] getGlyphs(StringBuilder text) {
209-
T[] glyphs = (T[])new GlyphBMP[sb.length()];
209+
T[] glyphs = (T[])new GlyphBMP[text.length()];
210210
LinkedList<CharToCreate> unCached = new LinkedList<CharToCreate>();
211211

212-
for (int i = 0; i < sb.length(); i++) {
213-
int codePoint = sb.codePointAt(i);
212+
for (int i = 0; i < text.length(); i++) {
213+
int codePoint = text.codePointAt(i);
214214
if (!canDisplay(codePoint) || invalidCharacters.contains(codePoint)) {
215215
codePoint = defaultCodePoint;
216216
}

src/com/atr/jme/font/TrueTypeMesh.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ public TrueTypeContainer getFormattedText(StringContainer stringContainer,
262262

263263
@Override
264264
public GlyphMesh[] getGlyphs(StringBuilder text) {
265-
GlyphMesh[] glyphs = new GlyphMesh[sb.length()];
265+
GlyphMesh[] glyphs = new GlyphMesh[text.length()];
266266
LinkedList<CharToCreate> unCached = new LinkedList<CharToCreate>();
267267

268-
for (int i = 0; i < sb.length(); i++) {
269-
int codePoint = sb.codePointAt(i);
268+
for (int i = 0; i < text.length(); i++) {
269+
int codePoint = text.codePointAt(i);
270270
if (!canDisplay(codePoint) || invalidCharacters.contains(codePoint)) {
271271
codePoint = defaultCodePoint;
272272
}

0 commit comments

Comments
 (0)