Class DefaultFontMappings

    • Constructor Detail

      • DefaultFontMappings

        public DefaultFontMappings​(FontMapping... mappings)
      • DefaultFontMappings

        public DefaultFontMappings​(List<FontMapping> mappings)
    • Method Detail

      • applicableTo

        public FontMappings applicableTo​(LocalePair pair)
        Returns applicable font mappings to a language pair in the specified order.
        Specified by:
        applicableTo in interface FontMappings
        Parameters:
        pair - The language pair
        Returns:
        The applicable font mappings to the language pair
      • targetFontFor

        public String targetFontFor​(String sourceFont)
        Returns a target font for a source font. The final target font value is determined by a sequential substitution of the source font values. I.e.; if there is more than one mapping; 0. Arial -> Times New Roman 1. Times New Roman -> Sans Serif then the first mapping will produce Times New Roman replacement and the second one will be applied to this new value, thus, ending up with the Sans Serif.
        Specified by:
        targetFontFor in interface FontMappings
        Parameters:
        sourceFont - The source font
        Returns:
        The target font
      • addFrom

        public void addFrom​(FontMappings.Input input)
        Description copied from interface: FontMappings
        Adds font mappings from input.
        Specified by:
        addFrom in interface FontMappings
        Parameters:
        input - The font mappings input to add from
      • writtenTo

        public <T> T writtenTo​(FontMappings.Output<T> output)
        Description copied from interface: FontMappings
        Obtains the font mappings output with the written font mappings to it.
        Specified by:
        writtenTo in interface FontMappings
        Parameters:
        output - The output
        Returns:
        The output with the written font mappings