Socket
Book a DemoInstallSign in
Socket

@akashic/bmpfont-generator

Package Overview
Dependencies
Maintainers
6
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akashic/bmpfont-generator

generate bitmap fonts from TrueType fonts

latest
Source
npmnpm
Version
4.0.5
Version published
Maintainers
6
Created
Source

bmpfont-generator

ttfファイルからビットマップフォントを作成するためのツールです。

インストール方法

このソフトウェアはcanvasモジュールに依存しています。canvasモジュールの動作のためにcairoをインストールしておく必要があります。cairoのインストール方法はcanvasモジュールのREADMEを参照してください。

$ npm install -g @akashic/bmpfont-generator

利用方法

ビットマップフォントの描画に使用するTrueTypeフォント(ttf形式)のファイル名と、出力されるビットマップフォント(png形式)のファイル名を指定してください。

$ bmpfont-generator infile.ttf outfile.png

ヘルプ

$ bmpfont-generator --help

オプション

オプション短縮名効果必須デフォルト値
--height <size>-H文字の縦サイズ(px)13
--fixed-width <size>-w文字の横サイズ(px) 。指定した場合、文字の幅に関わらずsizeを幅の値とする
--chars <string>-c書きだす文字の羅列0-9,a-Z,各種記号
--chars-file <filepath>-f書き出す文字が羅列されたテキストファイルのパス
--missing-glyph <char>-m-cの指定に含まれない文字の代わりに用いる代替文字フォントが持つ代替文字
--missing-glyph-image <filepath>-M代替文字として用いる画像ファイルのパス
--fill <fillstyle>-Fフィルスタイル#000000
--stroke <strokestyle>-Sストロークスタイル#000000
--quality <quality>-Q1-100の画質。指定する場合、 pngquant が必要圧縮しない
--baseline <baseline>ベースライン自動で計算された値
--no-anti-aliasアンチエイリアス無効化
--json <filepath>jsonファイルを書き出すパス<outfileName>_glyphs.json
--no-jsonjsonファイルを出力しない
--margin文字間の余白(px)1

ライセンス

本リポジトリは MIT License の元で公開されています。 詳しくは LICENSE をご覧ください。

ただし、画像ファイルおよび音声ファイルは CC BY 2.1 JP の元で公開されています。

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts