public class BasicFontResolver extends Object implements FontResolver
FontSource
s to return from those available in a
given FontManager
.Constructor and Description |
---|
BasicFontResolver(FontManager fontManager) |
Modifier and Type | Method and Description |
---|---|
protected float |
computeScore(FontAttributeSet expectedAttributes,
FontAttributeSet actualAttributes) |
protected Collection<FontSource> |
filterFontSources(Collection<FontSource> fontSources,
StringAttribute attribute) |
protected FontSource |
matchStyles(FontAttributeSet fontAttributeSet,
Collection<FontSource> fontSources) |
FontSource |
resolve(FontAttributeSet fontAttributeSet)
Finds
FontSource instances matching given attributes. |
public BasicFontResolver(FontManager fontManager)
public FontSource resolve(FontAttributeSet fontAttributeSet)
FontResolver
FontSource
instances matching given attributes.resolve
in interface FontResolver
fontAttributeSet
- the characteristics which the resulting FontSource
should have.FontSource
, or null
if there is no matchprotected FontSource matchStyles(FontAttributeSet fontAttributeSet, Collection<FontSource> fontSources)
protected float computeScore(FontAttributeSet expectedAttributes, FontAttributeSet actualAttributes)
protected Collection<FontSource> filterFontSources(Collection<FontSource> fontSources, StringAttribute attribute)
Copyright © 2024 levigo holding gmbh. All rights reserved.