chinese_font_library
1.3.0, released 3 months ago by hanshi.tech
Utilities to apply correct system Chinese fonts with precise weight and to load custom Chinese fonts at runtime.
What it does
Adds extensions to TextStyle, TextTheme and ThemeData to map Chinese characters to system fonts with accurate fontWeight handling. Allows downloading or loading custom Chinese fonts from URL, assets or files dynamically.
AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need correct Chinese font weight rendering across platforms
- You want to load large Chinese fonts on demand rather than bundling them
Skip it when
- You don't need special Chinese font handling
- Your app targets platforms where the package hasn't been verified (e.g., Linux)
Strengths
- Cross‑platform Chinese font fallback
- Precise weight support via FontWeight.value
- Dynamic font loading from web, assets, or file
Weaknesses
- Requires Flutter ≥3.41 and Dart ≥3.11
- Limited to Chinese fonts; not a general font manager
- Linux support is uncertain
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Text(
'你好世界 hello world',
style: const TextStyle(fontWeight: FontWeight.w100).useSystemChineseFont(),
);Alternatives
Packages that do the same job and could replace chinese_font_library.
- dynamic_fonts
Include dynamic web-hosted fonts or custom fonts in your Flutter app.
75Compare - flutter_font_icons
Vector Font Icons for Flutter, including icon sets from react-native-vector-icons and WeatherIcons.
61Compare - system_fonts
Load system fonts (ttf/otf) on Windows, macOS, Linux for Flutter apps
44Compare
Works with
Packages commonly used together with chinese_font_library: ones it builds on, ones built on it, and its own family.