type_face_provider 1.0.1 copy "type_face_provider: ^1.0.1" to clipboard
type_face_provider: ^1.0.1 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('\tfull names:');
    for (final fullName in typeface.fullNames) {
      print('\t\t- $fullName');
    }

    /// ...
    /// File: '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf'
    /// typefaces:
    ///   - DejaVu Sans Mono
    /// styles:
    ///   - Book
    /// full names:
    ///   - DejaVu Sans Mono
    /// ...
  }
}
1
likes
150
points
15
downloads

Documentation

API reference

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

License

MIT (license)

Dependencies

collection

More

Packages that depend on type_face_provider