FLUTTER ECOSYSTEM

mahdyar/persian-fonts-flutter

📦 一个用于使用免费波斯字体的 Flutter 包。

persian-fonts-flutter 项目封面
Stars
11
Forks
3
最近推送(UTC)
2024年8月26日
项目状态
未归档
Mahdyar GitHub avatar
GITHUB User

Mahdyar ↗

A 24 y.o nerd, who loves 0s and 1s.

语言DartObjective-CJava

技术话题

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

persian_fonts

A Flutter package for using free persian fonts.

The persian_fonts package for Flutter allows you to easily use any free persian fonts in your app.

Getting Started

persian_fonts_flutter

Currently, PersianFonts supports 5 types of fonts: Vazir, Samim, Shabnam, Sahel and B-Yekan. yours isn't hrere? add it!

First, add the persian_fonts package to your pubsec dependencies.

To import PersianFonts:

import 'package:persian_fonts/persian_fonts.dart';

To use PersianFonts as the default TextStyle:

Text(
  'These are persian fonts.',
  style: PersianFonts.Samim,
),

To use PersianFonts with a customized TextStyle:

Text(
  'These are persian fonts.',
  style: PersianFonts.Samim.copyWith(
    ...
    ),
),

You can also use PersianFonts to make or modify an entire text theme to use one of the supported fonts:

MaterialApp(
  theme: ThemeData(
    textTheme: PersianFonts.vazirTextTheme,
  ),
);