Skip to content

Commit

Permalink
[Fix] Loose 版のブロック要素の横幅を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
omonomo committed Nov 25, 2024
1 parent c234af8 commit 2be3935
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions font_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ scale_height_latin="87" # Latin フォントの半角英数文字の縦拡大率
move_x_hankaku_latin="-50" # Latin フォント全体のX座標移動量
scale_width_hankaku="100" # 半角英数文字の横拡大率
scale_height_hankaku="100" # 半角英数文字の縦拡大率
scale_width_box="85" # 半角罫線素片・ブロック要素の横拡大率
width_hankaku="512" # 半角文字幅
center_width=$((width_hankaku / 2)) # 半角文字X座標中心
move_x_calt_latin="10" # ラテン文字のカーニングX座標移動量
Expand All @@ -188,6 +189,7 @@ scale_height_latin_loose="92" # Latin フォントの半角英数文字の縦拡
move_x_hankaku_latin_loose="-19" # Latin フォント全体のX座標移動量 (Loose 版)
scale_width_hankaku_loose="100" # 半角英数文字の横拡大率 (Loose 版)
scale_height_hankaku_loose="100" # 半角英数文字の縦拡大率 (Loose 版)
scale_width_box_loose="95" # 半角罫線素片・ブロック要素の横拡大率 (Loose 版)
width_hankaku_loose="576" # 半角文字幅 (Loose 版)
center_width_loose=$((width_hankaku_loose / 2)) # 半角文字X座標中心 (Loose 版)
move_x_calt_latin_loose="12" # ラテン文字のカーニングX座標移動量 (Loose 版)
Expand Down Expand Up @@ -433,7 +435,9 @@ do
move_x_hankaku_latin=${move_x_hankaku_latin_loose} # Latin フォント全体のX座標移動量
scale_width_hankaku=${scale_width_hankaku_loose} # 半角英数文字の横拡大率
scale_height_hankaku=${scale_height_hankaku_loose} # 半角英数文字の縦拡大率
scale_width_box=${scale_width_box_loose} # 半角罫線素片・ブロック要素の横拡大率
width_hankaku=${width_hankaku_loose} # 半角文字幅
center_width=${center_width_loose} # 半角文字X座標中心
move_x_hankaku=${move_x_hankaku_loose} # 半角文字移動量
move_x_calt_latin=${move_x_calt_latin_loose} # ラテン文字のX座標移動量
move_x_calt_symbol=${move_x_calt_symbol_loose} # 記号のX座標移動量
Expand Down Expand Up @@ -1724,9 +1728,9 @@ while (i < SizeOf(input_list))
# --------------------------------------------------
# Scale down hankaku glyphs
# Change the scale of hankaku glyphs
if ("${draft_flag}" == "false")
Print("Scale down hankaku glyphs")
Print("Change the scale of hankaku glyphs")
Select(0u0020, 0u1fff) # 基本ラテン - ギリシア文字拡張 # 一部全角
SelectMore(0u2010, 0u218f) # 一般句読点 - 数字の形
SelectMore(0u2200, 0u22ff) # 数学記号 # 全角半角混合
Expand Down Expand Up @@ -1771,10 +1775,8 @@ while (i < SizeOf(input_list))
endloop
Select(0u2320, 0u2321) # インテグラル # 高さそのまま
SelectMore(0u239b, 0u23ae) # 括弧・インテグラル # 高さそのまま
SelectMore(0u23b0, 0u23b3) # 括弧括弧素片・総和記号部分
SelectMore(0u23be, 0u23cc) # 歯科表記記号
SelectMore(0u2500, 0u259f) # 罫線素片・ブロック要素 # 高さそのまま
SelectMore(0u239b, 0u23ae) # 括弧素片・インテグラル # 高さそのまま
SelectMore(0u23b0, 0u23b3) # 括弧素片・総和記号部分
foreach
if (WorthOutputting())
if (GlyphInfo("Width") <= 700)
Expand All @@ -1785,6 +1787,18 @@ while (i < SizeOf(input_list))
endif
endloop
Select(0u23be, 0u23cc) # 歯科表記記号
SelectMore(0u2500, 0u259f) # 罫線素片・ブロック要素 # 高さそのまま、幅固定
foreach
if (WorthOutputting())
if (GlyphInfo("Width") <= 700)
Scale(${scale_width_box}, 100, 307, ${center_height_hankaku})
Move(${move_x_hankaku_latin}, 0)
SetWidth(${width_hankaku})
endif
endif
endloop
Select(${address_store_mod}, ${address_store_mod} + ${num_mod_glyphs} * 6 - 1) # 保管したDQVZ
SelectMore(${address_store_zero}, ${address_store_zero} + 5) # 保管したスラッシュ無し0
SelectMore(${address_store_visi_latin}, ${address_store_visi_latin} + 1) # 保管した ⁄|
Expand Down Expand Up @@ -1842,9 +1856,8 @@ while (i < SizeOf(input_list))
endloop
Select(0u2320, 0u2321) # インテグラル
SelectMore(0u239b, 0u23ae) # 括弧・インテグラル
SelectMore(0u23b0, 0u23b3) # 括弧括弧素片・総和記号部分
SelectMore(0u23be, 0u23cc) # 歯科表記記号
SelectMore(0u239b, 0u23ae) # 括弧素片・インテグラル
SelectMore(0u23b0, 0u23b3) # 括弧素片・総和記号部分
foreach
if (WorthOutputting())
if (GlyphInfo("Width") <= 700)
Expand Down Expand Up @@ -2463,6 +2476,11 @@ while (i < \$argc)
Move(0, ${move_y_pl})
Select(0ue0d1); RemoveOverlap(); Copy() # 
Select(65552); Paste() # Temporary glyph
if ("${loose_flag}" == "true") # Loose 版対応
Scale(113, 100, 256, ${center_height_hankaku})
endif
Copy()
j = 0
while (j < 32)
Select(0u2580 + j); PasteInto()
Expand All @@ -2473,6 +2491,8 @@ while (i < \$argc)
j += 1
endloop
Select(65552); Clear() # Temporary glyph
# 八卦
Print("Edit bagua trigrams")
Select(0u2630); Copy() # ☰
Expand Down

0 comments on commit 2be3935

Please sign in to comment.