Class FirstMatchFontSelectorStrategy

    • Constructor Detail

      • FirstMatchFontSelectorStrategy

        public FirstMatchFontSelectorStrategy​(FontProvider fontProvider,
                                              FontSelector fontSelector,
                                              FontSet additionalFonts)
        Creates a new instance of FirstMatchFontSelectorStrategy.
        Parameters:
        fontProvider - the font provider
        fontSelector - the font selector
        additionalFonts - the set of fonts to be used additionally to the fonts added to font provider.
    • Method Detail

      • isCurrentFontCheckRequired

        protected boolean isCurrentFontCheckRequired()
        If it is necessary to provide a check that the best font for passed symbol equals to the current font. Result of checking is used to split text into parts in case if inequality.
        Specified by:
        isCurrentFontCheckRequired in class AbstractFontSelectorStrategy
        Returns:
        true if check is needed, otherwise false