From 0b46db627f8aedafedd5001dcaa22e925b020287 Mon Sep 17 00:00:00 2001 From: omonomo Date: Wed, 14 Aug 2024 07:09:16 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calt_table_maker.sh | 9 +++++---- font_generator.sh | 8 ++++---- make_all.sh | 2 +- run_ff_ttx.sh | 37 +++++++++++++++++++------------------ table_modificator.sh | 17 +++++++++-------- uvs_table_maker.sh | 3 ++- 6 files changed, 40 insertions(+), 36 deletions(-) diff --git a/calt_table_maker.sh b/calt_table_maker.sh index 7914eb0..4b5b5f2 100755 --- a/calt_table_maker.sh +++ b/calt_table_maker.sh @@ -574,11 +574,10 @@ calt_table_maker_help() echo " -x Cleaning temporary files" # 一時作成ファイルの消去のみ echo " -l Leave (do NOT remove) temporary files" echo " -n number Set glyph number of \"A moved left\"" - echo " -S Don't make calt settings for latin characters" + echo " -k Don't make calt settings for latin characters" echo " -b Make kerning settings for basic latin characters only" echo " -O Enable force optimization process" echo " -o Enable optimization process" - exit 0 } # メイン |||||||||||||||||||||||||||||||||||||||| @@ -588,11 +587,12 @@ echo "- GSUB table [calt, LookupType 6] maker -" echo # Get options -while getopts hxln:SbOo OPT +while getopts hxln:kbOo OPT do case "${OPT}" in "h" ) calt_table_maker_help + exit 0 ;; "x" ) echo "Option: Cleaning temporary files" @@ -609,7 +609,7 @@ do glyphNo_flag="true" glyphNo="${OPTARG}" ;; - "S" ) + "k" ) echo "Option: Don't make calt settings for latin characters" symbol_only_flag="true" ;; @@ -626,6 +626,7 @@ do optimize_mode="optional" ;; * ) + calt_table_maker_help exit 1 ;; esac diff --git a/font_generator.sh b/font_generator.sh index 4ffd0ec..06830b0 100755 --- a/font_generator.sh +++ b/font_generator.sh @@ -378,7 +378,7 @@ font_generator_help() echo " -l Leave (do NOT remove) temporary files" echo " -N string Set fontfamily (\"string\")" echo " -n string Set fontfamily suffix (\"string\")" - echo " -L Set the ratio of hankaku to zenkaku characters to 9:16" + echo " -w Set the ratio of hankaku to zenkaku characters to 9:16" echo " -Z Disable visible zenkaku space" echo " -z Disable visible hankaku space" echo " -u Disable zenkaku hankaku underline" @@ -393,15 +393,15 @@ font_generator_help() echo " -d Enable draft mode (skip time-consuming processes)" echo " -P End just before patching" echo " -p Run font patch only" - exit 0 } # Get options -while getopts hVxf:vlN:n:LZzubtOsceoSdPp OPT +while getopts hVxf:vlN:n:wZzubtOsceoSdPp OPT do case "${OPT}" in "h" ) font_generator_help + exit 0 ;; "V" ) exit 0 @@ -432,7 +432,7 @@ do echo "Option: Set fontfamily suffix: ${OPTARG}" font_familyname_suffix=${OPTARG// /} ;; - "L" ) + "w" ) echo "Option: Set the ratio of hankaku to zenkaku characters to 9:16" loose_flag="true" hankaku_width=${hankaku_width_Loose} # 半角文字幅 diff --git a/make_all.sh b/make_all.sh index 8cf7b11..88365b2 100755 --- a/make_all.sh +++ b/make_all.sh @@ -2,7 +2,7 @@ # 通常版、Loose 版の両方を一度に生成させるプログラム -sh run_ff_ttx.sh -FLl -N "CyroitLoose" +sh run_ff_ttx.sh -Fwl -N "CyroitLoose" sh run_ff_ttx.sh -Fr exit 0 diff --git a/run_ff_ttx.sh b/run_ff_ttx.sh index d821e5c..039fb50 100755 --- a/run_ff_ttx.sh +++ b/run_ff_ttx.sh @@ -61,8 +61,8 @@ option_format_fg() { # font_generator 用のオプションを整形 (戻り値: if [ "${leaving_tmp_flag}" = "true" ]; then # 引数に l はないが、一時作成ファイルを残す場合 opt="${opt}l" fi - if [ "${loose_flag}" = "true" ]; then # 引数に L はないが、Loose 版にする場合 - opt="${opt}L" + if [ "${loose_flag}" = "true" ]; then # 引数に w はないが、Loose 版にする場合 + opt="${opt}w" fi if [ "${draft_flag}" = "true" ]; then # 引数に d はないが、下書きモードで処理する場合 opt="${opt}d" @@ -74,26 +74,26 @@ option_format_tm() { # table_modificator 用のオプションを整形 (戻り local opt # 整形前のオプション local leaving_tmp_flag # 一時作成ファイルを残すか local loose_flag # Loose 版にするか - local reuse_list_flag # 作成済みのリストを使用するか local symbol_only_flag # カーニング設定を記号、桁区切りのみにするか + local reuse_list_flag # 作成済みのリストを使用するか opt="${2}" leaving_tmp_flag="${3}" loose_flag="${4}" - reuse_list_flag="${5}" - symbol_only_flag="${6}" + symbol_only_flag="${5}" + reuse_list_flag="${6}" if [ "${leaving_tmp_flag}" != "false" ]; then # -l オプションか 引数に l がある場合 opt="${opt}l" fi - if [ "${loose_flag}" != "false" ]; then # -L オプションか 引数に L がある場合 - opt="${opt}L" + if [ "${loose_flag}" != "false" ]; then # -w オプションか 引数に w がある場合 + opt="${opt}w" + fi + if [ "${symbol_only_flag}" != "false" ]; then # -k オプションがある場合 + opt="${opt}k" fi if [ "${reuse_list_flag}" != "false" ]; then # -r オプションがある場合 opt="${opt}r" fi - if [ "${symbol_only_flag}" != "false" ]; then # -S オプションがある場合 - opt="${opt}S" - fi eval "${1}=\${opt}" # 戻り値を入れる変数名を1番目の引数に指定する } @@ -121,14 +121,13 @@ forge_ttx_help() echo " -l Leave (do NOT remove) temporary files" echo " -N string Set fontfamily (\"string\")" echo " -n string Set fontfamily suffix (\"string\")" - echo " -L Set the ratio of hankaku to zenkaku characters to 9:16" - echo " -S Don't make calt settings for latin characters" + echo " -w Set the ratio of hankaku to zenkaku characters to 9:16" + echo " -k Don't make calt settings for latin characters" echo " -r Reuse an existing list" echo " -d Draft mode (skip time-consuming processes)" # グリフ変更の確認用 (最後は通常モードで確認すること) echo " -C End just before editing calt feature" # caltの編集・確認を繰り返す時用にcalt適用前のフォントを作成する echo " -p Run calt patch only" # -C の続きを実行 echo " -F Complete Mode (generate finished fonts)" # 完成品作成 - exit 0 } echo @@ -136,11 +135,12 @@ echo "*** FontForge and TTX runner ***" echo # オプションを取得 -while getopts hxlN:n:LSrdCpF OPT +while getopts hxlN:n:wkrdCpF OPT do case "${OPT}" in "h" ) forge_ttx_help + exit 0 ;; "x" ) echo "Option: Cleaning temporary files" @@ -160,11 +160,11 @@ do echo "Option: Set fontfamily suffix: ${OPTARG}" font_familyname_suffix=${OPTARG// /} ;; - "L" ) + "w" ) echo "Option: Set the ratio of hankaku to zenkaku characters to 9:16" loose_flag="true" ;; - "S" ) + "k" ) echo "Option: Don't make calt settings for latin characters" symbol_only_flag="true" ;; @@ -204,6 +204,7 @@ do table_modify_flag="true" ;; * ) + forge_ttx_help exit 1 ;; esac @@ -223,7 +224,7 @@ if [ "${mode}" != "-p" ]; then # -p オプション以外は引数を取得 exit 1 elif [ "${S}" = "l" ]; then # l が含まれていれば一時作成ファイルを残す (-l オプションと区別) leaving_tmp_flag="true_arg" - elif [ "${S}" = "L" ]; then # L が含まれていれば Loose 版にする (-L オプションと区別) + elif [ "${S}" = "w" ]; then # w が含まれていれば Loose 版にする (-w オプションと区別) loose_flag="true_arg" elif [ "${S}" = "d" ]; then # d が含まれていれば下書きモードで処理 (-d オプションと区別) draft_flag="true_arg" @@ -310,7 +311,7 @@ case ${mode} in "-F" ) opt_tm="o" ;; * ) opt_tm="b" ;; esac -option_format_tm opt_tm "${opt_tm}" "${leaving_tmp_flag}" "${loose_flag}" "${reuse_list_flag}" "${symbol_only_flag}" +option_format_tm opt_tm "${opt_tm}" "${leaving_tmp_flag}" "${loose_flag}" "${symbol_only_flag}" "${reuse_list_flag}" if [ -n "${opt_tm}" ]; then sh table_modificator.sh -"${opt_tm}" -N "${font_familyname}${font_familyname_suffix}" else diff --git a/table_modificator.sh b/table_modificator.sh index da670f6..5108132 100755 --- a/table_modificator.sh +++ b/table_modificator.sh @@ -72,8 +72,8 @@ option_format_cm() { # calt_table_maker 用のオプションを整形 (戻り if [ "${leaving_tmp_flag}" != "false" ]; then # -l オプションがある場合 opt="${opt}l" fi - if [ "${symbol_only_flag}" != "false" ]; then # -S オプションがある場合 - opt="${opt}S" + if [ "${symbol_only_flag}" != "false" ]; then # -k オプションがある場合 + opt="${opt}k" fi if [ "${basic_only_flag}" != "false" ]; then # -b オプションがある場合 opt="${opt}b" @@ -110,8 +110,8 @@ table_modificator_help() echo " -x Cleaning temporary files" # 一時作成ファイルの消去のみ echo " -l Leave (do NOT remove) temporary files" echo " -N string Set fontfamily (\"string\")" - echo " -L Set the ratio of hankaku to zenkaku characters to 9:16" - echo " -S Don't make calt settings for latin characters" + echo " -w Set the ratio of hankaku to zenkaku characters to 9:16" + echo " -k Don't make calt settings for latin characters" echo " -b Make kerning settings for basic Latin characters only" echo " -o Enable optimization process when make kerning settings" echo " -r Reuse an existing list" @@ -120,7 +120,6 @@ table_modificator_help() echo " -t Disable edit other tables" echo " -C End just before editing calt feature" echo " -p Run calt patch only" - exit 0 } echo @@ -128,11 +127,12 @@ echo "= Font tables Modificator =" echo # Get options -while getopts hxlN:LSbormgtCp OPT +while getopts hxlN:wkbormgtCp OPT do case "${OPT}" in "h" ) table_modificator_help + exit 0 ;; "x" ) echo "Option: Cleaning temporary files" @@ -149,12 +149,12 @@ do echo "Option: Set fontfamily: ${OPTARG}" font_familyname=${OPTARG// /} ;; - "L" ) + "w" ) echo "Option: Set the ratio of hankaku to zenkaku characters to 9:16" loose_flag="true" hankaku_width="${hankaku_width_Loose}" ;; - "S" ) + "k" ) echo "Option: Don't make calt settings for latin characters" symbol_only_flag="true" ;; @@ -203,6 +203,7 @@ do calt_insert_flag="true" ;; * ) + table_modificator_help exit 1 ;; esac diff --git a/uvs_table_maker.sh b/uvs_table_maker.sh index db5b743..f46ac47 100755 --- a/uvs_table_maker.sh +++ b/uvs_table_maker.sh @@ -49,7 +49,6 @@ uvs_table_maker_help() echo " -x Cleaning temporary files" # 一時作成ファイルの消去のみ echo " -l Leave (do NOT remove) temporary files" echo " -N string Set fontfamily (\"string\")" - exit 0 } echo @@ -62,6 +61,7 @@ do case "${OPT}" in "h" ) uvs_table_maker_help + exit 0 ;; "x" ) echo "Option: Cleaning temporary files" @@ -77,6 +77,7 @@ do font_familyname=${OPTARG// /} ;; * ) + uvs_table_maker_help exit 1 ;; esac