Package limn.graphics

Interface FontCatalog

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FontCatalog
The set of font families the running backend can resolve: the bundled faces plus any enumerated from the operating system. Installed via Fonts; EMPTY is the headless default.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FontCatalog
    No backend / headless: nothing to offer.
  • Method Summary

    Modifier and Type
    Method
    Description
    Font family names available for use, de-duplicated and sorted.
  • Field Details

    • EMPTY

      static final FontCatalog EMPTY
      No backend / headless: nothing to offer.
  • Method Details

    • families

      List<String> families()
      Font family names available for use, de-duplicated and sorted.

      Must not block and must not read anything. This is asked on the UI thread, from a font picker being populated and from anything else building a list, and it must return whatever is known right now. An implementation that has to enumerate the operating system does that on a worker and publishes the fuller list by installing itself again through Fonts.installCatalog(limn.graphics.FontCatalog), which notifies listeners; returning a short list first and a complete one later is expected and correct.