पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.4.0

fontsource

अपने फ्लटर ऐप में फॉन्टसोर्स के फॉन्ट्स को आसानी से जोड़ें। फॉन्टसोर्स API के लिए डार्ट इंटरफेस शामिल है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
59
लाइक
12
Pub अंक
140

पैकेज इंस्टॉल करें

flutter pub add fontsource

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

Fontsource एक Flutter/Dart पैकेज है जो आपके एप्लिकेशन में Fontsource फॉन्ट के एकीकरण को सरल बनाता है। यह Fontsource API के लिए एक Dart इंटरफ़ेस प्रदान करता है, जिससे विकासकर्ता सभी समर्थित प्लेटफॉर्मों पर उच्च गुणवत्ता वाले ओपन-सोर्स फॉन्ट आसानी से शामिल कर सकते हैं। पैकेज फॉन्ट लोडिंग और प्रबंधन को सरल बनाता है, न्यूनतम कॉन्फ़िगरेशन के साथ सुसंगत टाइपोग्राफी सुनिश्चित करता है। Android, iOS, Web, macOS, Windows और Linux के समर्थन के साथ, यह कस्टमाइज़ेबल और प्रदर्शन-प्रभावी फॉन्ट रेंडरिंग की आवश्यकता वाले क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए आदर्श है।

उपयोग

  • Flutter ऐप्स में कस्टम ओपन-सोर्स फॉन्ट जोड़ना
  • प्लेटफॉर्म-समग्र फ़ॉन्ट सुसंगतता
  • फॉन्ट लोडिंग प्रदर्शन को अनुकूलित करना
  • Fontsource के माध्यम से Google फॉन्ट का एकीकरण
  • वेब और मोबाइल ऐप्स में कस्टम टाइपोग्राफी

मुख्य विशेषताएँ

  • Fontsource API के लिए Dart इंटरफेस
  • बहुपлатफॉर्म समर्थन
  • pub add के माध्यम से आसान एकीकरण
  • पूर्व-अनुकूलित फ़ॉन्ट फ़ाइलें
  • स्वचालित फॉन्ट परिवार संभालना
  • हल्का और तेज़

इनके लिए उपयुक्त

  • ओपन-सोर्स फॉन्ट्स की तलाश में फ्लटर डेवलपर्स
  • प्लेटफॉर्म के बीच सुसंगत टाइपोग्राफी की आवश्यकता वाले ऐप्स
  • प्रदर्शन और न्यूनतम सेटअप पर ध्यान केंद्रित परियोजनाएँ
  • कस्टम फॉन्ट के साथ काम कर रहे डिज़ाइनर
  • ब्रांड-फोकस्ड टाइपोग्राफी के साथ वेब और मोबाइल एप्लिकेशन

विचार योग्य बातें

  • प्रारंभिक फॉन्ट डाउनलोड के लिए इंटरनेट की आवश्यकता होती है
  • फॉन्टसोर्स-होस्टेड फॉन्ट परिवारों तक सीमित
  • बड़े फॉन्ट सेट के साथ ऐप बंडल के आकार में वृद्धि हो सकती है
  • ऑफलाइन-केवल एप्लिकेशन के लिए उपयुक्त नहीं है
  • फ़ॉन्ट प्रीलोडिंग रणनीतियों के साथ सबसे अच्छा उपयोग किया जाता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Fontsource for Flutter

Easily add Fontsource fonts to your flutter app. Includes a dart interface for the Fontsource API.

Getting started

To start, create a config in either your pubspec.yaml file under the fontsource key or in the fontsource.yaml file.

include: [my-package] # Defaults to all
fonts:
  alex-brush: # This can be any font id
    version: 4.5.3 # Defaults to latest
    subsets: [latin, latin-ext] # Defaults to all
    weights: [400] # Defaults to all
    styles: [normal] # Defaults to all

The config will tell fontsource what to download and bundle into your flutter app. To ensure everything is downloaded, execute dart run fontsource after your config is modified. Also, make sure to run it whenever your repository is cloned. This will generate a local package in the .fontsource directory.

You can then import the fontsource package:

import 'package:fontsource/fontsource.dart';

Use the FontsourceTextStyle class to use a Fontsource font:

const Text(
  'Hello world!',
  style: FontsourceTextStyle(fontFamily: 'Alex Brush', fontSize: 30),
),

FontsourceTextStyle extends the TextStyle class, so any styling properties can be used to change the way the text looks.

Use With Packages

To use this in a package, add a configuration like normal, but don't run the fontsource cli.

Packages with a fontsource configuration will automatically be included. To manually specify what packages should be scanned, provide an include key with a list of package names to scan.

Fontsource API

The Fontsource API also has a dart interface that can be accessed through fontsource/api.dart.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 6 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।