455 metrics[1] = strikeMetrics.getDescent(); 456 metrics[2] = strikeMetrics.getLeading(); 457 metrics[3] = strikeMetrics.getMaxAdvance(); 458 } 459 460 /* Currently the layout code calls this. May be better for layout code 461 * to check the font class before attempting to run, rather than needing 462 * to promote this method up from TrueTypeFont 463 */ 464 protected byte[] getTableBytes(int tag) { 465 return null; 466 } 467 468 /* implemented for fonts backed by an sfnt that has 469 * OpenType or AAT layout tables. 470 */ 471 protected long getLayoutTableCache() { 472 return 0L; 473 } 474 475 /* for layout code */ 476 protected long getUnitsPerEm() { 477 return 2048; 478 } 479 480 boolean supportsEncoding(String encoding) { 481 return false; 482 } 483 484 public boolean canDoStyle(int style) { 485 return (style == this.style); 486 } 487 488 /* 489 * All the important subclasses override this which is principally for 490 * the TrueType 'gasp' table. 491 */ 492 public boolean useAAForPtSize(int ptsize) { 493 return true; 494 } | 455 metrics[1] = strikeMetrics.getDescent(); 456 metrics[2] = strikeMetrics.getLeading(); 457 metrics[3] = strikeMetrics.getMaxAdvance(); 458 } 459 460 /* Currently the layout code calls this. May be better for layout code 461 * to check the font class before attempting to run, rather than needing 462 * to promote this method up from TrueTypeFont 463 */ 464 protected byte[] getTableBytes(int tag) { 465 return null; 466 } 467 468 /* implemented for fonts backed by an sfnt that has 469 * OpenType or AAT layout tables. 470 */ 471 protected long getLayoutTableCache() { 472 return 0L; 473 } 474 475 /* Used only on OS X. 476 */ 477 protected long getPlatformNativeFontPtr() { 478 return 0L; 479 } 480 481 /* for layout code */ 482 protected long getUnitsPerEm() { 483 return 2048; 484 } 485 486 boolean supportsEncoding(String encoding) { 487 return false; 488 } 489 490 public boolean canDoStyle(int style) { 491 return (style == this.style); 492 } 493 494 /* 495 * All the important subclasses override this which is principally for 496 * the TrueType 'gasp' table. 497 */ 498 public boolean useAAForPtSize(int ptsize) { 499 return true; 500 } |