setMapFont method

GemError setMapFont(
  1. String regularPath, {
  2. String boldPath = '',
  3. String italicPath = '',
})

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

See also:

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']);
}