すでにパッチが適用されているフォントをパッチできますか?

すでにパッチが適用されているフォントをパッチできますか?

電源ケーブルVimとGvimのための一種のプラグインです。より便利に使用するには、画像(記号)が追加されたフォントを使用してください。つまり、フォントセットを「パッチ」しました。最近、Powerlineはコードが変更されたため、フォントを再パッチする必要があると述べました。同じリンクを見つけることができますここ

質問

  • すでにパッチを適用したフォントを再パッチできますか、それとも新しいソースフォントを受け取る必要がありますか?
  • パッチ可能なフォント(例:TTFまたは...)?

ベストアンサー1

パッチスクリプトは、次の独自のGitHubリポジトリからアクセスできます。電力線パッチ

実験

上記のパッチスクリプトをダウンロードすることから始めました。

$ git clone https://github.com/Lokaltog/powerline-fontpatcher.git

.ttf次に、問題をテストするためにサンプルファイルを選択しました。

$ ls -lr | grep ttf
-rw-r--r--. 1 saml saml 242700 Jul  2 20:29 LucidaTypewriterRegular.ttf

フォントパッチスクリプトを実行すると、次のような出力が生成されます。

$ scripts/powerline-fontpatcher LucidaTypewriterRegular.ttf 
The glyph named fraction is mapped to U+2215.
But its name indicates it should be mapped to U+2044.
The glyph named periodcentered is mapped to U+2219.
But its name indicates it should be mapped to U+00B7.
The glyph named macron is mapped to U+02C9.
But its name indicates it should be mapped to U+00AF.
The glyph named stigma is mapped to U+03DA.
But its name indicates it should be mapped to U+03DB.
The glyph named digamma is mapped to U+03DC.
But its name indicates it should be mapped to U+03DD.
The glyph named koppa is mapped to U+03DE.
But its name indicates it should be mapped to U+03DF.
The glyph named sampi is mapped to U+03E0.
But its name indicates it should be mapped to U+03E1.
The glyph named fraction1 is mapped to U+2044.
But its name indicates it should be mapped to U+2215.

生成されたファイルを使用してください。

$ ls -lr | grep ttf
-rw-r--r--. 1 saml saml 242700 Jul  2 20:29 LucidaTypewriterRegular.ttf
-rw-rw-r--. 1 saml saml 242576 Jul  2 21:02 Lucida Sans Typewriter Regular for Powerline.ttf

生成されたファイルをもう一度実行すると、毎回上記と同じ出力が表示されるため、次のファイルが生成されます。

$ ls -ltr | grep ttf
-rw-r--r--. 1 saml saml 242700 Jul  2 20:29 LucidaTypewriterRegular.ttf
-rw-rw-r--. 1 saml saml 242576 Jul  2 21:02 Lucida Sans Typewriter Regular for Powerline.ttf
-rw-rw-r--. 1 saml saml 242780 Jul  2 21:04 Lucida Sans Typewriter Regular for Powerline for Powerline.ttf
-rw-rw-r--. 1 saml saml 242984 Jul  2 21:07 Lucida Sans Typewriter Regular for Powerline for Powerline for Powerline.ttf

.ttfImageMagickのコマンドを使用してファイルを開こうとすると、生成されたすべてのdisplayファイルが有効と見なされます。

$ display Lucida Sans Typewriter Regular for Powerline for Powerline for Powerline.ttf

    SS#1

主なポイント

そのため、パッチスクリプトを使用するとフォントファイルを再処理できるようになりますが、これを行うと、なぜサイズが大きくなり続けるのか分からないので、もし問題が発生する場合に備えて元のファイルを残しておきます。

私はおそらく、安全のために以前にパッチしたファイルを捨てて再生成しました。

引用する

おすすめ記事