Skip to content
pubscout

native_font

1.1.1, released 4 years ago by an unverified publisher

A plugin for lazily loading ttf and otf fonts from the native side.

WASM-ready
$ flutter pub add native_font
Source repository

What it does

Allows Flutter applications to request font data dynamically from the native platform (iOS and Android). It uses Flutter's FontLoader to load fonts asynchronously and automatically refreshes text once the font data is provided from the native side.

AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to load fonts dynamically or lazily from native resources.
  • You want to share native font handling between iOS and Android codebases.

Skip it when

  • You can bundle all your fonts directly within Flutter assets.
  • You are looking for a complete pre-built font repository package like google_fonts without writing native bridge code.

Strengths

  • Supports lazy loading of ttf and otf font formats.
  • Automatically refreshes text when font data is loaded asynchronously.
  • Includes fallback mechanisms if the font cannot be found or loaded.

Weaknesses

  • Requires writing native implementation code in Swift/Objective-C and Java to handle font data callbacks.
  • Limited documentation outside of basic usage examples.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires adding platform-specific implementation code in Swift, Objective-C, or Java to handle the font data handler callbacks.

Text(
  'Foo',
  style: nativeFontTextStyle(
    fontFamily: 'Cardo',
    fontSize: 30,
  ),
)

Alternatives

Packages that do the same job and could replace native_font.