搜尋套件、儲存庫與 APP 分類

fontresoft 封面
套件詳情v0.0.5

fontresoft

FontResoft 是我們為任何 Flutter 項目編譯和整理的 Flutter 字體套件。它包含多種美麗的字型,可用於建構美觀、吸引眼球的 Flutter 應用程式。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
155
喜歡數
7
Pub 分數
160

安裝套件

flutter pub add fontresoft

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

FontResoft 是為 Flutter 應用程式精心挑選的美觀字型集合。經過編譯與整理,可無縫整合,讓開發者能輕鬆提升應用程式的視覺吸引力,於所有主要平台實現時尚排版。此套件透過提供即用型字型,簡化字型管理,可透過 pub 輕鬆加入任何 Flutter 專案。適合快速打造醒目且現代感十足的使用者介面,設定簡單。

適用情境

  • 透過吸引人的排版增強應用介面
  • 建立視覺上吸引人的行動與網頁應用
  • 在Flutter專案中快速新增自訂字型
  • 設計品牌化或主題化應用
  • 提升數位產品的可讀性和美學

主要特色

  • 預包裝的精美字型集合
  • 跨平台支援(Android、iOS、Web、macOS、Windows、Linux)
  • 透過 Flutter pub 簡單整合
  • 針對效能與使用便利性進行優化
  • 定期更新的字型庫

適合對象

  • Flutter 開發人員尋找現成的字型
  • 專注於視覺品牌設計的設計師
  • 需要一致字體的專案
  • 針對多個平台的應用程式
  • 希望減少字型設定時間的開發者

使用建議

  • 字型已預先選定;自訂僅限於內建選項
  • 由於內嵌字體,應用程式大小可能略微增加
  • 使用商業用途前需檢查各個字型的授權條款
  • 不適合高度專業化或獨特的排版需求
  • 依賴外部儲存庫進行更新

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

FontResoft

pub package pub points popularity likes Star on Github Awesome Flutter License: BSD

FontResoft is a comprehensive Flutter font package curated to provide developers with a diverse selection of beautiful fonts for building visually appealing and engaging Flutter applications. With a wide range of font families and weights readily available, FontResoft simplifies the process of integrating custom typography into Flutter projects, offering a variety of beautiful fonts without the need for network connectivity.

Table of Contents

Installation

To use fontresoft in your Flutter project, add the following to your pubspec.yaml file:

dependencies:
  fontresoft: ^0.0.5

Then, run:

flutter pub get

Usage

Import the package:

import 'package:fontresoft/fontresoft.dart';

An example of how to use this in the main.dart file:

ThemeData(
    useMaterial3: true,
    brightness: Brightness.light,
    colorSchemeSeed: Colors.purpleAccent,
    fontFamily: FontResoft.poppins,
    package: FontResoft.package,
    highlightColor: Colors.transparent,
    splashColor: Colors.transparent,
);

Examples of how to use in your dart code.

Text(
  'Sample Text',
  style: Font.sourceSans().copyWith(
    fontSize: 23,
    color: color.withOpacity(1),
  ),
);
Text(
  Font.sourceSans().getFontName,
  style: Font.sourceSans(
    style: TextStyle(
      fontSize: 23,
      color: color.withOpacity(1),
    ),
  ),
)

More examples from main.dart

import 'dart:math';

import 'package:flutter/material.dart';
import 'package:fontresoft/fontresoft.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        useMaterial3: true,
        brightness: Brightness.dark,
        colorSchemeSeed: Colors.purpleAccent,
        fontFamily: FontResoft.poppins,
        package: FontResoft.package,
        highlightColor: Colors.transparent,
        splashColor: Colors.transparent,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final List<TextStyle> list = [
    Font.inconsolata(),
    Font.inter(),
    Font.lato(),
    Font.oswald(),
    Font.poppins(),
    Font.quicksand(),
    Font.robotoCondensed(),
    Font.shantellSans(),
    Font.sourceSans(),
    Font.sFProDisplay(),
    Font.sFProText(),
    Font.comfortaa(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('FontResoft Fonts'),
        backgroundColor: Colors.black87,
        centerTitle: true,
      ),
      body: Center(
        child: ListView.builder(
          itemCount: list.length,
          itemBuilder: (context, index) {
            var color = Color.fromRGBO(
              Random().nextInt(255),
              Random().nextInt(255),
              Random().nextInt(255),
              1,
            );
            return GestureDetector(
              onTap: () {
                Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (context) => SecondPage(font: list[index]),
                  ),
                );
              },
              child: Card(
                elevation: 0,
                color: color.withOpacity(0.3),
                margin: const EdgeInsets.all(16),
                child: SizedBox(
                  width: double.infinity,
                  height: 100,
                  child: Center(
                    child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
                      Text(
                        list[index].getFontName,
                        style: list[index].copyWith(
                          fontSize: 23,
                          color: color.withOpacity(1),
                        ),
                      ),
                      Text(
                        '${list[index].fontFamily}',
                        style: list[index].copyWith(
                          fontSize: 20,
                          color: color.withOpacity(0.5),
                          fontStyle: FontStyle.italic,
                        ),
                      ),
                      Text(
                        '$color',
                        style: list[index].copyWith(
                          fontSize: 16,
                          color: color.withOpacity(0.5),
                          fontStyle: FontStyle.italic,
                        ),
                      ),
                    ]),
                  ),
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}

Features

  • Diverse Font Collection: FontResoft offers a rich assortment of font families, including Inconsolata, Inter, Lato, Oswald, Poppins, Quicksand, Roboto Condensed, ShantellSans, and SourceSansPro, each meticulously selected to cater to various design preferences and project requirements.

  • Easy Integration: Integrating fonts from FontResoft into Flutter applications is straightforward, thanks to the streamlined implementation process. Developers can effortlessly access and utilize these fonts within their projects without the need for complex setup or configuration.

  • Multiple Weights and Styles: Each font family in FontResoft comes with multiple weights and styles, empowering developers to enhance typographic diversity and achieve precise design specifications. Whether it's bold, italic, light, medium, or extra-bold variants, FontResoft offers comprehensive options to suit different design aesthetics.

  • Local Font Loading: Fonts provided by FontResoft are locally stored within the package, eliminating the reliance on external networks for font retrieval. This ensures consistent font availability and performance across various device environments, without the risk of network-related issues impacting font rendering.

Currently 12 font families are defined in this library

  1. [x] inconsolata
  2. [x] inter
  3. [x] lato
  4. [x] oswald
  5. [x] poppins
  6. [x] quicksand
  7. [x] robotoCondensed
  8. [x] shantellSans
  9. [x] sourceSans
  10. [x] sFProDisplay
  11. [x] sFProText
  12. [x] comfortaa

Examples

Screenshots

Screenshot 1

Screenshot 1

Screenshot 2

Screenshot 2

Screenshot 3

Screenshot 3

Additional information

In the future, we plan to provide support for additional fonts, making it even simpler for other developers to swiftly adopt our work. If you think we should add other typefaces, please let us know. We created this package to alleviate some of the burden that developers have when it comes to organizing the fonts by weights and styles.

Contributing

  • Issues: If you encounter any bugs, have feature requests, or want to suggest improvements, please open an issue on our GitHub repository. Provide as much detail as possible to help us understand the problem or idea better.

  • Pull Requests: If you'd like to contribute code changes, feel free to submit a pull request. Before doing so, make sure to fork the repository and create a new branch for your changes. Follow the existing coding style and guidelines, and write clear and concise commit messages. Your pull request will undergo review, and we'll work together to ensure the changes align with the project's goals.

  • Feature Requests: If you have ideas for new features or enhancements, please open an issue to discuss them. We value community feedback and want to ensure that new features align with the project's direction and objectives.

  • Spread the Word: Help us grow the FontResoft community by sharing the project with others. Whether through social media, blog posts, or word of mouth, spreading the word about FontResoft helps attract more users and contributors.

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。