equal
deleted
inserted
replaced
301 * Note that a laid out GlyphVector which has assigned glyph positions |
301 * Note that a laid out GlyphVector which has assigned glyph positions |
302 * doesn't have this stricture.. |
302 * doesn't have this stricture.. |
303 */ |
303 */ |
304 public void setGlyphIndex(int i) { |
304 public void setGlyphIndex(int i) { |
305 glyphindex = i; |
305 glyphindex = i; |
|
306 if (images[i] == 0L) { |
|
307 metrics[0] = (int)gposx; |
|
308 metrics[1] = (int)gposy; |
|
309 metrics[2] = 0; |
|
310 metrics[3] = 0; |
|
311 metrics[4] = 0; |
|
312 return; |
|
313 } |
306 float gx = |
314 float gx = |
307 StrikeCache.unsafe.getFloat(images[i]+StrikeCache.topLeftXOffset); |
315 StrikeCache.unsafe.getFloat(images[i]+StrikeCache.topLeftXOffset); |
308 float gy = |
316 float gy = |
309 StrikeCache.unsafe.getFloat(images[i]+StrikeCache.topLeftYOffset); |
317 StrikeCache.unsafe.getFloat(images[i]+StrikeCache.topLeftYOffset); |
310 |
318 |
339 } else { |
347 } else { |
340 if (len > graybits.length) { |
348 if (len > graybits.length) { |
341 graybits = new byte[len]; |
349 graybits = new byte[len]; |
342 } |
350 } |
343 } |
351 } |
|
352 if (images[glyphindex] == 0L) { |
|
353 return graybits; |
|
354 } |
344 long pixelDataAddress = |
355 long pixelDataAddress = |
345 StrikeCache.unsafe.getAddress(images[glyphindex] + |
356 StrikeCache.unsafe.getAddress(images[glyphindex] + |
346 StrikeCache.pixelDataOffset); |
357 StrikeCache.pixelDataOffset); |
347 |
358 |
348 if (pixelDataAddress == 0L) { |
359 if (pixelDataAddress == 0L) { |
446 float glx = x + 0.5f; |
457 float glx = x + 0.5f; |
447 float gly = y + 0.5f; |
458 float gly = y + 0.5f; |
448 char gw, gh; |
459 char gw, gh; |
449 float gx, gy, gx0, gy0, gx1, gy1; |
460 float gx, gy, gx0, gy0, gx1, gy1; |
450 for (int i=0; i<len; i++) { |
461 for (int i=0; i<len; i++) { |
|
462 if (images[i] == 0L) { |
|
463 continue; |
|
464 } |
451 gx = StrikeCache.unsafe.getFloat(images[i]+xOffset); |
465 gx = StrikeCache.unsafe.getFloat(images[i]+xOffset); |
452 gy = StrikeCache.unsafe.getFloat(images[i]+yOffset); |
466 gy = StrikeCache.unsafe.getFloat(images[i]+yOffset); |
453 gw = StrikeCache.unsafe.getChar(images[i]+wOffset); |
467 gw = StrikeCache.unsafe.getChar(images[i]+wOffset); |
454 gh = StrikeCache.unsafe.getChar(images[i]+hOffset); |
468 gh = StrikeCache.unsafe.getChar(images[i]+hOffset); |
455 |
469 |