Skip to content

MsdfSource

abstract class MsdfSource
Implements: IMsdfSource
Known subtypes: BinaryMsdfSource, OpenTypeMsdfSource
Package: dev.joid.lib.font.impl.msdf.source · Module: core · Source: MsdfSource.java

Base class of the MSDF sources, which can override the weight and the style that the file declares.

Wrap a file in a source when the weight or the style that it declares is wrong (Set the weight of a font file).

ReturnsSignatureSummary
MsdfSource()Creates a source, for a subclass.

PropertyTypeDefaultSummary
italicbooleannullIf set, the face read by this source declares this style instead of the one of its file.
weightFontWeightnullIf set, the face read by this source declares this FontWeight instead of the one of its file.

ReturnsSignatureSummary
MsdfFontFaceread()Reads the face with parse(), then applies the weight and the style set on this source.
ReturnsSignatureSummary
MsdfFontFaceparse() hook abstract protectedJOID calls it from read() on a loader thread: read the face as its file describes it.
Inherited from IMsdfSource (1)

describe

MsdfSource()

Creates a source, for a subclass.

  • this italic(boolean italic) fluent

Default: null

If set, the face read by this source declares this style instead of the one of its file.

  • this weight(FontWeight weight) fluent

Default: null

If set, the face read by this source declares this FontWeight instead of the one of its file.

MsdfFontFace read()

Reads the face with parse(), then applies the weight and the style set on this source.

MsdfFontFace parse() hook abstract protected

JOID calls it from read() on a loader thread: read the face as its file describes it. Throw IOException when it cannot be read.


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

Report a problem with this page