{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

FontSynthesis.Companion

public static class FontSynthesis.Companion


Summary

Public methods

static final @NonNull FontSynthesis

The system synthesizes both bold and slanted fonts if either of them are not available in the FontFamily

static final @NonNull FontSynthesis

Turns off font synthesis.

static final @NonNull FontSynthesis

Only an slanted font is synthesized, if it is not available in the FontFamily.

static final @NonNull FontSynthesis

Only a bold font is synthesized, if it is not available in the FontFamily.

Public methods

getAll

public static final @NonNull FontSynthesis getAll()

The system synthesizes both bold and slanted fonts if either of them are not available in the FontFamily

getNone

public static final @NonNull FontSynthesis getNone()

Turns off font synthesis. Neither bold nor slanted faces are synthesized if they don't exist in the FontFamily

getStyle

public static final @NonNull FontSynthesis getStyle()

Only an slanted font is synthesized, if it is not available in the FontFamily. Bold fonts will not be synthesized.

getWeight

public static final @NonNull FontSynthesis getWeight()

Only a bold font is synthesized, if it is not available in the FontFamily. Slanted fonts will not be synthesized.