Interface FontManager

  • All Known Implementing Classes:
    FontManagerImpl

    public interface FontManager
    Interface which exposes methods for retrieving fonts and information about the fonts (such as the font name, font style, and font type)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.io.InputStream> getFont​(java.lang.String fontName, java.lang.String fontStyle, PerspectiveFontType fontType)
      Returns a stream of the raw font's bytes identified by the given name, style, and type
      java.util.List<PerspectiveFont> getFonts()
      Returns a copy of the list of all of the managed fonts
    • Method Detail

      • getFonts

        @Nonnull
        java.util.List<PerspectiveFont> getFonts()
        Returns a copy of the list of all of the managed fonts
        Returns:
        A List of all managed fonts
      • getFont

        @Nonnull
        java.util.Optional<java.io.InputStream> getFont​(java.lang.String fontName,
                                                        java.lang.String fontStyle,
                                                        PerspectiveFontType fontType)
        Returns a stream of the raw font's bytes identified by the given name, style, and type
        Parameters:
        fontName - The name of the font to fetch
        fontStyle - The style of the font to fetch
        fontType - The type of the font to fetch
        Returns:
        An Optional containing the InputStream of raw bytes for the font with the given name, style, and type or an empty Optional of no such font is managed with the given name, style, and type