AssetsManager (API Reference)
Class AssetsManager
Assets manager interface. Can be used to make assets available to the SDK.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterFont(String fontName, String fontPath) Registers a font under a font name.voidregisterFontWithFallback(String fontName, String fontPath, List<String> fallbackFontFilePaths) Registers a font set under a font name.
-
Constructor Details
-
AssetsManager
Creates an instance of AssetsManager.
- Parameters:
context-MapContext to which the assets belong.
-
-
Method Details
-
registerFont
Registers a font under a font name. After registration, the font name can be used in
- the SVG
texttag asfont-familyattribute parameter when creating aMapImagewithImageFormat.SVG. MapMarker.TextStyle
Repeated registration with the same font name is ignored.
- Parameters:
fontName-A font name.
fontPath-A font file path. TTF, OTF and WOFF formats are supported.
Can be an asset file path or an absolute file path.
- the SVG
-
registerFontWithFallback
public void registerFontWithFallback(@NonNull String fontName, @NonNull String fontPath, @NonNull List<String> fallbackFontFilePaths) Registers a font set under a font name. After registration, the font name can be used in
- the SVG
texttag asfont-familyattribute parameter when creating aMapImagewithImageFormat.SVG. MapMarker.TextStyle
Repeated registration with the same font name is ignored.
- Parameters:
fontName-A font name.
fontPath-A font file path. TTF, OTF and WOFF formats are supported.
Can be an asset file path or an absolute file path.
fallbackFontFilePaths-Additional font files are intended to be used if main font does not contain required character symbol and shall be sorted starting from most useful.
- the SVG
-