Closed azarashichop closed 7 years ago
【追記】 一部、デバッグ用のechoもありますが、実行結果です。
[root@siva Cica]# bash -x ./cica_generator.sh auto
Author: miiton
This script is to generate ``Cica'' font from UbuntuMono and Rounded Mgen+ 1M. It requires 10-60 minutes to generate Cica...
+ getopts hVf:vln:wWbBZ:zas OPT ++ expr 1 - 1
@azarashichop ご報告ありがとうございます。
mkdir tmp
mkdir Cica
してから実行するとどうでしょう?
こちらで Ubuntu 16.04 で新しく環境作って以下のように実行することで正常動作しました。
sudo apt-get -y install fontforge unar
git clone --recursive git@github.com:miiton/Cica.git
wget http://font.ubuntu.com/download/ubuntu-font-family-0.83.zip
unar ubuntu-font-family-0.83.zip
cp ubuntu-font-family-0.83/UbuntuMono-R.ttf ./sourceFonts
wget https://osdn.jp/downloads/users/8/8598/rounded-mgenplus-20150602.7z
unar rounded-mgenplus-20150602.7z
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-regular.ttf ./sourceFonts
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-bold.ttf ./sourceFonts
mkdir tmp
mkdir Cica
./cica_generator.sh auto
生成スクリプトグダグダのままですいません。。
お返事有難うございます。
中間生成される「modified_ubuntumono_generator.pe」をダイレクトに指定して
fontforgeを実行してみました。
[root@siva Cica]# fontforge -script tmp/cica_generator_tmpdir.SFmLdv/modified_ubuntumono_generator.pe Copyright (c) 2000-2009 by George Williams. Executable based on sources from 22:35 GMT 22-Jun-2009. Library based on sources from 22:35 GMT 22-Jun-2009. Generate modified UbuntuMono. Find ./sourceFonts/UbuntuMono-R.ttf. The requested file, UbuuntuMono-R.ttf, does not exist Open: Failed to open: ./sourceFonts/UbuntuMono-R.ttf Called from... tmp/cica_generator_tmpdir.SFmLdv/modified_ubuntumono_generator.pe: line 9
The requested file, UbuuntuMono-R.ttf, does not exist Ubuuntuになってる?
Ubuuntu
はソースコード上は見当たらないですね。
treeコマンドの結果を貼り付けて頂く事できますか? こちらで実行した結果は以下です
% tree INSERT
.
├── 02_MergeEmoji.pe
├── 03_MergeDevIcon.pe
├── 09_SetFontInfo.pe
├── COPYRIGHT.txt
├── Cica
│ ├── Cica-Bold.ttf
│ └── Cica-Regular.ttf
├── LICENSE.txt
├── README.md
├── cica_generator.sh
├── fontpatcher
│ ├── LICENSE
│ ├── README.rst
│ ├── fonts
│ │ └── powerline-symbols.sfd
│ ├── scripts
│ │ └── powerline-fontpatcher
│ └── setup.py
├── misc
│ └── os2version_reviser.sh
├── modify_underline.py
├── pua.html
├── screenshots
│ └── ss1.png
├── sourceFonts
│ ├── UbuntuMono-R.ttf
│ ├── gopher.sfd
│ ├── rounded-mgenplus-1m-bold.ttf
│ └── rounded-mgenplus-1m-regular.ttf
└── tmp
├── Cica-Bold.ttf
├── Cica-Bold.ttf.bak
├── Cica-Regular.ttf
├── Cica-Regular.ttf.bak
├── os2version_reviser_tmpdir.N7WDHd
│ ├── sfd2ttf.pe
│ ├── tmpsfd.sfd
│ ├── tmpsfd2.sfd
│ └── ttf2sfd.pe
└── post_script_tmpdir.3kqPTJ
└── post_script.pe
treeコマンドと、生成スクリプトの中身です。
tree結果
`
[root@siva Cica]# tree
.
├── 02_MergeEmoji.pe
├── 03_MergeDevIcon.pe
├── 09_SetFontInfo.pe
├── cica_generator.sh
├── COPYRIGHT.txt
├── debug.log
├── fontpatcher
├── hoge.dat
├── LICENSE.txt
├── misc
│ └── os2version_reviser.sh
├── modify_underline.py
├── pua.html
├── README.md
├── screenshots
│ └── ss1.png
├── scr_str.sh
├── sourceFonts
│ ├── gopher.sfd
│ ├── mplus-TESTFLIGHT-059
│ │ ├── LICENSE_E
│ │ ├── LICENSE_J
│ │ ├── README_E
│ │ └── README_J
│ ├── README_Rounded-MgenPlus.txt
│ ├── rounded-mgenplus-1c-black.ttf
│ ├── rounded-mgenplus-1c-bold.ttf
│ ├── rounded-mgenplus-1c-heavy.ttf
│ ├── rounded-mgenplus-1c-light.ttf
│ ├── rounded-mgenplus-1c-medium.ttf
│ ├── rounded-mgenplus-1cp-black.ttf
│ ├── rounded-mgenplus-1cp-bold.ttf
│ ├── rounded-mgenplus-1cp-heavy.ttf
│ ├── rounded-mgenplus-1cp-light.ttf
│ ├── rounded-mgenplus-1cp-medium.ttf
│ ├── rounded-mgenplus-1cp-regular.ttf
│ ├── rounded-mgenplus-1cp-thin.ttf
│ ├── rounded-mgenplus-1c-regular.ttf
│ ├── rounded-mgenplus-1c-thin.ttf
│ ├── rounded-mgenplus-1m-bold.ttf
│ ├── rounded-mgenplus-1m-light.ttf
│ ├── rounded-mgenplus-1m-medium.ttf
│ ├── rounded-mgenplus-1mn-bold.ttf
│ ├── rounded-mgenplus-1mn-light.ttf
│ ├── rounded-mgenplus-1mn-medium.ttf
│ ├── rounded-mgenplus-1mn-regular.ttf
│ ├── rounded-mgenplus-1mn-thin.ttf
│ ├── rounded-mgenplus-1m-regular.ttf
│ ├── rounded-mgenplus-1m-thin.ttf
│ ├── rounded-mgenplus-1p-black.ttf
│ ├── rounded-mgenplus-1p-bold.ttf
│ ├── rounded-mgenplus-1p-heavy.ttf
│ ├── rounded-mgenplus-1p-light.ttf
│ ├── rounded-mgenplus-1p-medium.ttf
│ ├── rounded-mgenplus-1pp-black.ttf
│ ├── rounded-mgenplus-1pp-bold.ttf
│ ├── rounded-mgenplus-1pp-heavy.ttf
│ ├── rounded-mgenplus-1pp-light.ttf
│ ├── rounded-mgenplus-1pp-medium.ttf
│ ├── rounded-mgenplus-1pp-regular.ttf
│ ├── rounded-mgenplus-1pp-thin.ttf
│ ├── rounded-mgenplus-1p-regular.ttf
│ ├── rounded-mgenplus-1p-thin.ttf
│ ├── rounded-mgenplus-20150602.7z
│ ├── rounded-mgenplus-2c-black.ttf
│ ├── rounded-mgenplus-2c-bold.ttf
│ ├── rounded-mgenplus-2c-heavy.ttf
│ ├── rounded-mgenplus-2c-light.ttf
│ ├── rounded-mgenplus-2c-medium.ttf
│ ├── rounded-mgenplus-2cp-black.ttf
│ ├── rounded-mgenplus-2cp-bold.ttf
│ ├── rounded-mgenplus-2cp-heavy.ttf
│ ├── rounded-mgenplus-2cp-light.ttf
│ ├── rounded-mgenplus-2cp-medium.ttf
│ ├── rounded-mgenplus-2cp-regular.ttf
│ ├── rounded-mgenplus-2cp-thin.ttf
│ ├── rounded-mgenplus-2c-regular.ttf
│ ├── rounded-mgenplus-2c-thin.ttf
│ ├── rounded-mgenplus-2m-bold.ttf
│ ├── rounded-mgenplus-2m-light.ttf
│ ├── rounded-mgenplus-2m-medium.ttf
│ ├── rounded-mgenplus-2m-regular.ttf
│ ├── rounded-mgenplus-2m-thin.ttf
│ ├── rounded-mgenplus-2p-black.ttf
│ ├── rounded-mgenplus-2p-bold.ttf
│ ├── rounded-mgenplus-2p-heavy.ttf
│ ├── rounded-mgenplus-2p-light.ttf
│ ├── rounded-mgenplus-2p-medium.ttf
│ ├── rounded-mgenplus-2pp-black.ttf
│ ├── rounded-mgenplus-2pp-bold.ttf
│ ├── rounded-mgenplus-2pp-heavy.ttf
│ ├── rounded-mgenplus-2pp-light.ttf
│ ├── rounded-mgenplus-2pp-medium.ttf
│ ├── rounded-mgenplus-2pp-regular.ttf
│ ├── rounded-mgenplus-2pp-thin.ttf
│ ├── rounded-mgenplus-2p-regular.ttf
│ ├── rounded-mgenplus-2p-thin.ttf
│ ├── SIL_Open_Font_License_1.1.txt
│ ├── ubuntu-font-family-0.83.zip
│ └── UbuntuMono-R.ttf
└── tmp
└── cica_generator_tmpdir.SFmLdv
├── cica_generator.pe
├── modified_roundedmgenplus_generator.pe
└── modified_ubuntumono_generator.pe
7 directories, 98 files [root@siva Cica]# `
スクリプト
`[root@siva Cica]# cat tmp/cica_generator_tmpdir.SFmLdv/modified_ubuntumono_generator.pe
Print("Generate modified UbuntuMono.")
Print("Find ./sourceFonts/UbuntuMono-R.ttf.") Open("./sourceFonts/UbuntuMono-R.ttf")
ScaleToEm(860, 140)
if ("true" == "true") Select(0u00a4); Clear() # currency Select(0u00a7); Clear() # section Select(0u00a8); Clear() # dieresis Select(0u00ad); Clear() # soft hyphen Select(0u00b0); Clear() # degree Select(0u00b1); Clear() # plus-minus Select(0u00b4); Clear() # acute Select(0u00b6); Clear() # pilcrow Select(0u00d7); Clear() # multiply Select(0u00f7); Clear() # divide Select(0u2018); Clear() # left ' Select(0u2019); Clear() # right ' Select(0u201c); Clear() # left " Select(0u201d); Clear() # right " Select(0u2020); Clear() # dagger Select(0u2021); Clear() # double dagger Select(0u2026); Clear() # ... Select(0u2122); Clear() # TM Select(0u2191); Clear() # uparrow Select(0u2193); Clear() # downarrow endif
SelectWorthOutputting() ClearInstrs(); UnlinkReference()
Print("Save Modified-UbuntuMono-Regular.sfd.") Save("./tmp/cica_generator_tmpdir.SFmLdv/Modified-UbuntuMono-Regular.sfd")
Print("While making UbuntuMono bold, wait a little...") SelectWorthOutputting() ExpandStroke(30, 0, 0, 0, 1) Select(0u003e); Copy() # > Select(0u003c); Paste(); HFlip() # < RoundToInt(); RemoveOverlap(); RoundToInt()
Print("Save Modified-UbuntuMono-Bold.sfd.") Save("./tmp/cica_generator_tmpdir.SFmLdv/Modified-UbuntuMono-Bold.sfd") Close()
if (0 != 0) Open("./tmp/cica_generator_tmpdir.SFmLdv/Modified-UbuntuMono-Regular.sfd") Print("While making regular-face UbuntuMono bold, wait a little...") SelectWorthOutputting() foreach ExpandStroke(0, 0, 0, 0, 2) endloop Select(0u003e); Copy() # > Select(0u003c); Paste(); HFlip() # < RoundToInt(); RemoveOverlap(); RoundToInt() Save("./tmp/cica_generator_tmpdir.SFmLdv/Modified-UbuntuMono-Regular.sfd") Close() endif
Quit() `
うーん? Ubuuntu
はどこから出てきたんでしょうね?
下記コマンドは動きますか?
fontforge -lang=ff -c 'Open("./sourceFonts/UbuntuMono-R.ttf")'
fontforge -lang=ff -c 'Open("./sourceFonts/UbuntuMono-R.ttf")'
を実行したところ、同じエラーが表示されました。 fontforge周りのトラブルのようです・・・ お騒がせしました。 ディストリ関連の情報共有します。
[root@siva Cica]# cat /etc/redhat-release CentOS release 6.8 (Final)
[root@siva Cica]# fontforge -version Copyright (c) 2000-2009 by George Williams. Executable based on sources from 22:35 GMT 22-Jun-2009. Library based on sources from 22:35 GMT 22-Jun-2009. fontforge 20090622 libfontforge 20090622 [root@siva Cica]#
了解です。ではクローズさせていただきますね。
一応こちらの環境も。。
% fontforge --version
Copyright (c) 2000-2012 by George Williams.
Executable based on sources from 14:57 GMT 31-Jul-2012-ML.
Library based on sources from 14:57 GMT 31-Jul-2012.
fontforge 20120731
libfontforge 20120731-ML
あと、fontpatcher
ディレクトリはsubmoduleになっているので、
git clone --recursive https://github.com/miiton/Cica
などで全てのソースが取得できます。
了解です。情報ありがとうございます(・д・`●)
あれから、試行錯誤した上で正常にフォント生成できました。 ①fontforgeのバージョンが古いと失敗。201207xxに変更 ②Cica/tmp、Cica/Cicaディレクトリをmkdir ③lightlineフォントパッチャー、Noto EmojiおよびDeviconの フォントファイルを個別に入手、ディレクトリに配置。
READMEや,generator.shに記載しておいて下さると、私のような勘違いなくなるかもです。
268行目、「 Open("${input_ubuntumono}")」 の処理がうまくいっていないようです。
スクリプトのコード間違いかもしれませんので、確認お願いします。 此方でも確認します。