FontDiskLookup

FontDiskLookup

Overview

FontDiskLookup is a class in Aspose.PDF FOSS for Java.

Resolves a logical font name (e.g.

This class provides 5 methods for working with FontDiskLookup objects in Java programs. Available methods include: extractFaceAt, extractFirstFaceFromTTC, isTTC, loadByExactBasename, loadByName. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.

Methods

SignatureDescription
loadByName(logicalName: String)byte[]Searches the OS font directories for {@code logicalName} and returns
the bytes of a standalone TTF for the first matching face.
loadByExactBasename(basename: String)byte[]Loads a font file by an exact basename (no candidate-list expansion).
isTTC(bytes: byte[])booleanReturns {@code true} when {@code bytes} starts with the {@code ttcf}
magic of a TrueType Collection.
extractFirstFaceFromTTC(ttc: byte[])byte[]Rewrites the first face of a TrueType Collection into a standalone
TTF buffer.
extractFaceAt(ttc: byte[], faceOffset: int)byte[]Extracts the face whose sfnt header begins at {@code faceOffset} into
a fresh standalone TTF.

See Also

 English