パッケージ、リポジトリ、アプリカテゴリを検索

text_to_path_maker のカバー
パッケージ詳細v0.6.0

text_to_path_maker

任意のフォントの文字をパスに変換し、アニメーション化できるFlutterパッケージ。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
1150
いいね数
45
Pub ポイント
150

パッケージをインストール

flutter pub add text_to_path_maker

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

任意のフォントのテキスト文字をベクターパスに変換するFlutterパッケージで、形状とアニメーションに対する正確な制御が可能になります。個々のパスセグメントを操作することで、カスタムアニメーションテキストエフェクトを作成できます。複数のプラットフォームでのアプリケーションにおけるクリエイティブUI、ダイナミックタイポグラフィ、ビジュアルストーリーテリングに最適です。このパッケージはFlutterのレンダリング機能を活用し、滑らかなアニメーションと高品質な出力を実現します。

用途

  • アニメーションテキスト効果
  • カスタムタイポグラフィデザイン
  • インタラクティブなUI要素
  • アプリにおけるビジュアルストーリーテリング
  • ダイナミックロゴアニメーション

主な機能

  • フォント文字をパスに変換します
  • カスタムフォントの読み込みをサポート
  • パスベースのアニメーションを有効にする
  • クロスプラットフォーム互換性
  • 高解像度出力

適している対象

  • 高度なテキスト制御を求めるデザイナー
  • アニメーションインターフェースを構築する開発者
  • 独自のタイポグラフィックビジュアルを必要とするアプリ
  • クリエイティブなマルチメディアアプリケーション
  • アート的なUIが必要なFlutterプロジェクト

注意事項

  • 複雑なテキストのメモリ使用量が高くなる
  • 慎重なパフォーマンス最適化が必要です
  • ローマ字以外の文字体系に対する制限付きサポート
  • アニメーションの複雑さはフレームレートに影響を与える可能性があります
  • 埋め込みのためのフォントライセンスを確認する必要があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Text to Path Maker

This is a pure Flutter and Dart package that allows you to convert text--both characters and icons--into paths. It can generate SVG path strings and Flutter Path objects too.

Additionally, this package offers a bunch of methods you can use to animate those paths.

At the core of this package is a .ttf file parser, written in pure Dart. You can, if you want to, use it to read the font tables present in your TrueType font file.

Getting started

You must always start by calling the parseTTFAsset() method available in the PMFontReader class to parse your font asset. Currently, only .ttf files are supported.

Once the font has been parsed, you'll have access to a PMFont object. You can call its generatePathForCharacter() method to convert any character into a Path object. Note that this method expects you to pass the character code of the character.

Next, you'll want to use the PMTransform.moveAndScale() method to position and scale the path. This is usually necessary because, by default, the paths can be quite large.

At this point, you can render the Path object onto any Canvas object. If you want to animate the path, however, you must call the PMPieces.breakIntoPieces() method. This method splits the path into tiny paths, depending on the precision you specify. These tiny paths, when rendered sequentially, will create the illusion of the character being drawn.

There's also a utility PMPainter class, which extends the CustomPainter class. You can use this to quickly render your animation using a CustomPaint widget.

Refer to the example code to learn more.

Notes

This package is still a work in progress. It works reasonably well with most fonts, but there's no guarantee that it will handle every single font you have. It has been tested with Roboto, FontAwesome, and Material Icons. If you find a bug, you can raise an issue on this project's GitHub repository.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。