setMapFont method
Set a custom map font for this view.
The font files (.ttf / .otf) are used instead of the built-in font and of the
font defined by the map style. Each path replaces its face (regular, bold, italic); a
face without a path keeps the built-in one, and characters missing from a custom face
are drawn with the built-in one. Passing no path at all restores the style / built-in
font. All the given files are read before anything changes, so on error the current
font is kept.
Parameters
regularPath: Regular font file path. Empty to keep the built-in regular face.boldPath: Bold font file path. Defaults to empty.italicPath: Italic font file path. Defaults to empty.
Returns
- GemError.success on success.
- GemError.notFound if a font file was not found or is empty.
- GemError.io if the font could not be loaded.
See also:
- mapFontPath - Get the custom map font file path.
Implementation
GemError setMapFont(
String regularPath, {
String boldPath = '',
String italicPath = '',
}) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapViewPreferences',
'setMapFont',
args: <String, Object>{
'regularPath': regularPath,
'boldPath': boldPath,
'italicPath': italicPath,
},
dependencyId: _mapPointerId,
);
return GemErrorExtension.fromCode(resultString['result']);
}