सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
फॉन्टिफाई SVG आइकन को OTF फॉन्ट में बदलता है और आसान एकीकरण के लिए फ्लटर-संगत डार्ट क्लास जनरेट करता है। यह एक कमांड-लाइन इंटरफ़ेस (CLI) और एक API प्रदान करता है, जिससे विकासकर्ता अपने फ्लटर एप्लिकेशन में कस्टम आइकन को फॉन्ट के रूप में बंडल कर सकते हैं। इससे बहुत सारे छवि संसाधनों की आवश्यकता को कम करके आइकन प्रबंधन को सरल बनाया जाता है और फॉन्ट-आधारित रेंडरिंग के माध्यम से प्रदर्शन में सुधार होता है। यह उपकरण विशेष रूप से कस्टम या ब्रांडेड आइकन सेट की आवश्यकता वाले प्रोजेक्ट्स के लिए उपयोगी है।
उपयोग
SVG से कस्टम आइकन फॉन्ट बनाना
Flutter ऐप्स में ब्रांडेड आइकन को एकीकृत करना
फ़ॉन्ट-आधारित आइकन के साथ ऐप बंडल आकार को कम करना
CI/CD पाइपलाइन में आइकन फॉन्ट जनरेशन को स्वचालित करना
मुख्य विशेषताएँ
SVG से OTF फॉन्ट रूपांतरण
Flutter क्लास जनरेशन
CLI और API समर्थन
कस्टम आइकन नामिंग का समर्थन करता है
Flutter प्रदर्शन के लिए अनुकूलित
इनके लिए उपयुक्त
कस्टम आइकन की आवश्यकता वाले फ्लटर डेवलपर्स
बड़े आइकन सेट का प्रबंधन कर रही टीमें
संपत्ति अवकाश को कम करने के लक्ष्य वाले प्रोजेक्ट
विचार योग्य बातें
प्रवेश के लिए SVG फ़ाइलों की आवश्यकता होती है
फॉन्ट-आधारित आइकन रेंडरिंग तक सीमित
निर्मित आइकन संपादन उपकरण नहीं हैं
रनटाइम पर डायनामिक आइकन बदलने के लिए उपयुक्त नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Fontify
The Fontify package provides an easy way to convert SVG icons to OpenType font
and generate Flutter-compatible class that contains identifiers for the icons
(just like CupertinoIcons or Icons classes).
The package is written fully in Dart and doesn't require any external dependency.
Compatible with dart2js and dart2native.
SVG transforms are applied to paths according to specs.
SVG <g> element's children are expanded to the root with transformations applied.
Anything else related to the group is ignored and group referencing is not supported.
When ignoreShapes is set to false,
every SVG shape's (circle, rect, etc.) outline is converted to path.
Note that any attributes like "fill" or "stroke" are ignored and only the outline is used,
so the resulting glyph may look different from SVG icon.
It's recommended to convert every element in SVG to path.
When normalize is set to false, it's recommended that SVG icons have the same height.
Otherwise, final result might not look as expected.
When Flutter class is generated, static variables names derive from SVG file name
converted to pascal case with non-allowed characters removed.
Name is set to 'unnamed', if it's empty.
Suffix '_{i+1}' is added, if name already exists.
Planned
Support svg-to-ttf conversion (cubic-to-quad curves approximation needs to be done).
Support ligatures.
Support font variations.
Contributing
Any suggestions, issues, pull requests are welcomed.