type_face_provider 1.0.0 copy "type_face_provider: ^1.0.0" to clipboard
type_face_provider: ^1.0.0 copied to clipboard

PlatformLinux

Library which will provide you with collection of typefaces (font families) installed on user device.

example/type_face_provider_example.dart

import 'package:type_face_provider/type_face_provider.dart';

void main() async {
  final provider = TypefacesProvider.platform;
  final typefaces = await provider.getTypefaces();

  for (final typeface in typefaces) {
    print('File: \'${typeface.file.path}\'');
    print('\ttypefaces:');
    for (final name in typeface.names) {
      print('\t\t- $name');
    }
    print('\tstyles:');
    for (final style in typeface.styles) {
      print('\t\t- $style');
    }
    print('\tfonts:');
    for (final font in typeface.fonts) {
      print('\t\t- $font');
    }

    /// File: '/usr/share/fonts/truetype/noto/NotoSansMono-Bold.ttf'
    ///	typefaces:
    ///		- Noto Sans Mono
    ///	styles:
    ///		- Bold
    ///	fonts:
    ///		- Noto Sans Mono Bold
  }
}
1
likes
150
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Library which will provide you with collection of typefaces (font families) installed on user device.

Repository (GitHub)
View/report issues

Topics

#typeface #font #font-family #style

Documentation

API reference

License

MIT (license)

Dependencies

collection

More

Packages that depend on type_face_provider