int left = x;
for(int i=0; i<text.length(); i++) {
int c = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(text.charAt(i));
- if (c == -1 || metrics[c] == null) { left += metrics[64][4]; continue; }
+ if (c == -1 || metrics[c] == null) {
+ left += metrics[64] != null ? metrics[64][4] : 10;
+ continue;
+ }
buf.drawPicture(pg,
left,
y - (metrics[c][5] - metrics[c][2]),