FontFile
final class FontFile
Package: dev.joid.tool.msdf.font · Module: tool-msdf · Source: FontFile.java
The tables of a TrueType or OpenType file, read for the weight, the style and the kerning that the font of Java does not give.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
FontFile | read(byte[] data) factory | Reads the table directory of the file, or of the first font of a collection. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
int | getWeight() | Returns the weight of the OS/2 table, 400 without it. |
int | getUnitsPerEm() | Returns the units per em of the head table, 1000 without it. |
Map<String,Integer> | getTables() | Returns the offset of each table by tag, read-only. |
boolean | isItalic() | If true, the OS/2 or head table marks the face as italic or oblique. |
int | signed(int offset) | Returns the signed 16-bit value at that offset. |
int | unsigned(int offset) | Returns the unsigned 16-bit value at that offset. |
int | integer(int offset) | Returns the 32-bit value at that offset. |
Creation details
Section titled “Creation details”FontFile read(byte[] data) factory
Reads the table directory of the file, or of the first font of a collection.
Method details
Section titled “Method details”getWeight
Section titled “getWeight”int getWeight()
Returns the weight of the OS/2 table, 400 without it.
getUnitsPerEm
Section titled “getUnitsPerEm”int getUnitsPerEm()
Returns the units per em of the head table, 1000 without it.
getTables
Section titled “getTables”Map<String,Integer> getTables()
Returns the offset of each table by tag, read-only.
isItalic
Section titled “isItalic”boolean isItalic()
If true, the OS/2 or head table marks the face as italic or oblique.
signed
Section titled “signed”int signed(int offset)
Returns the signed 16-bit value at that offset.
unsigned
Section titled “unsigned”int unsigned(int offset)
Returns the unsigned 16-bit value at that offset.
integer
Section titled “integer”int integer(int offset)
Returns the 32-bit value at that offset.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
