From 7aa96c136c090ceb17fa7f4833aa8d1ed03a0b08 Mon Sep 17 00:00:00 2001 From: omonomo Date: Fri, 15 Nov 2024 21:36:39 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=E4=B8=80=E9=83=A8=E3=81=AE=E6=96=87?= =?UTF-8?q?=E5=AD=97=E3=81=AE=E4=B8=8A=E4=BB=98=E3=81=8D=E3=81=A8=E4=B8=8B?= =?UTF-8?q?=E4=BB=98=E3=81=8D=E3=81=8C=E9=80=86=E3=81=AB=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- font_generator.sh | 160 +++++++++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/font_generator.sh b/font_generator.sh index f8ba087b..284c2711 100755 --- a/font_generator.sh +++ b/font_generator.sh @@ -3846,6 +3846,86 @@ while (i < SizeOf(input_list)) # 上付き、下付き文字を置き換え Print("Edit superscrips and subscripts") + # 下付き + lookups = GetLookups("GSUB"); numlookups = SizeOf(lookups) + lookupName = "'subs' 下つき文字" + AddLookup(lookupName, "gsub_single", 0, [["subs",[["DFLT",["dflt"]]]]]) + lookupSub = lookupName + "サブテーブル" + AddLookupSubtable(lookupName, lookupSub) + + # ᵢ-ᵥ + orig = [0u0069, 0u0072, 0u0075, 0u0076] + j = 0 + while (j < SizeOf(orig)) + Select(orig[j]); Copy() + Select(0u1d62 + j); Paste() + Scale(${scale_super_sub}, 250, 0) + ChangeWeight(${weight_super_sub}) + CorrectDirection() + Move(0, ${move_y_sub}) + SetWidth(500) + glyphName = GlyphInfo("Name") # subs フィーチャ追加 + Select(orig[j]) + AddPosSub(lookupSub, glyphName) + j += 1 + endloop + + # ₀-₉ + j = 0 + while (j < 10) + Select(0u0030 + j); Copy() + Select(0u2080 + j); Paste() + Scale(${scale_super_sub}, 250, 0) + ChangeWeight(${weight_super_sub}) + CorrectDirection() + Move(0, ${move_y_sub}) + SetWidth(500) + glyphName = GlyphInfo("Name") # subs フィーチャ追加 + Select(0u0030 + j) + AddPosSub(lookupSub, glyphName) + j += 1 + endloop + + # ₊-ₜ + orig = [0u002b, 0u2212, 0u003d, 0u0028, 0u0029, 0u0000,\ + 0u0061, 0u0065, 0u006f, 0u0078, 0u0259,\ + 0u0068, 0u006b, 0u006c, 0u006d,\ + 0u006e, 0u0070, 0u0073, 0u0074] # 0u0000はダミー + j = 0 + while (j < SizeOf(orig)) + if (orig[j] != 0u0000) + Select(orig[j]); Copy() + Select(0u208a + j); Paste() + Scale(${scale_super_sub}, 250, 0) + ChangeWeight(${weight_super_sub}) + CorrectDirection() + Move(0, ${move_y_sub}) + SetWidth(500) + glyphName = GlyphInfo("Name") # subs フィーチャ追加 + Select(orig[j]) + AddPosSub(lookupSub, glyphName) + endif + j += 1 + endloop + + # ₋ + Select(0u208b) # ₋ + glyphName = GlyphInfo("Name") # subs フィーチャ追加 + Select(0u002d) # - + AddPosSub(lookupSub, glyphName) + + # ⱼ + Select(0u006a); Copy() # j + Select(0u2c7c); Paste() # ⱼ + Scale(${scale_super_sub}, 250, 0) + ChangeWeight(${weight_super_sub}) + CorrectDirection() + Move(0, ${move_y_sub}) + SetWidth(500) + glyphName = GlyphInfo("Name") # subs フィーチャ追加 + Select(0u006a) # j + AddPosSub(lookupSub, glyphName) + # 上付き lookups = GetLookups("GSUB"); numlookups = SizeOf(lookups) lookupName = "'sups' 上つき文字" @@ -4114,86 +4194,6 @@ while (i < SizeOf(input_list)) Select(0u0056) # V AddPosSub(lookupSub, glyphName) - # 下付き - lookups = GetLookups("GSUB"); numlookups = SizeOf(lookups) - lookupName = "'subs' 下つき文字" - AddLookup(lookupName, "gsub_single", 0, [["subs",[["DFLT",["dflt"]]]]]) - lookupSub = lookupName + "サブテーブル" - AddLookupSubtable(lookupName, lookupSub) - - # ᵢ-ᵥ - orig = [0u0069, 0u0072, 0u0075, 0u0076] - j = 0 - while (j < SizeOf(orig)) - Select(orig[j]); Copy() - Select(0u1d62 + j); Paste() - Scale(${scale_super_sub}, 250, 0) - ChangeWeight(${weight_super_sub}) - CorrectDirection() - Move(0, ${move_y_sub}) - SetWidth(500) - glyphName = GlyphInfo("Name") # subs フィーチャ追加 - Select(orig[j]) - AddPosSub(lookupSub, glyphName) - j += 1 - endloop - - # ₀-₉ - j = 0 - while (j < 10) - Select(0u0030 + j); Copy() - Select(0u2080 + j); Paste() - Scale(${scale_super_sub}, 250, 0) - ChangeWeight(${weight_super_sub}) - CorrectDirection() - Move(0, ${move_y_sub}) - SetWidth(500) - glyphName = GlyphInfo("Name") # subs フィーチャ追加 - Select(0u0030 + j) - AddPosSub(lookupSub, glyphName) - j += 1 - endloop - - # ₊-ₜ - orig = [0u002b, 0u2212, 0u003d, 0u0028, 0u0029, 0u0000,\ - 0u0061, 0u0065, 0u006f, 0u0078, 0u0259,\ - 0u0068, 0u006b, 0u006c, 0u006d,\ - 0u006e, 0u0070, 0u0073, 0u0074] # 0u0000はダミー - j = 0 - while (j < SizeOf(orig)) - if (orig[j] != 0u0000) - Select(orig[j]); Copy() - Select(0u208a + j); Paste() - Scale(${scale_super_sub}, 250, 0) - ChangeWeight(${weight_super_sub}) - CorrectDirection() - Move(0, ${move_y_sub}) - SetWidth(500) - glyphName = GlyphInfo("Name") # subs フィーチャ追加 - Select(orig[j]) - AddPosSub(lookupSub, glyphName) - endif - j += 1 - endloop - - # ₋ - Select(0u208b) # ₋ - glyphName = GlyphInfo("Name") # subs フィーチャ追加 - Select(0u002d) # - - AddPosSub(lookupSub, glyphName) - - # ⱼ - Select(0u006a); Copy() # j - Select(0u2c7c); Paste() # ⱼ - Scale(${scale_super_sub}, 250, 0) - ChangeWeight(${weight_super_sub}) - CorrectDirection() - Move(0, ${move_y_sub}) - SetWidth(500) - glyphName = GlyphInfo("Name") # subs フィーチャ追加 - Select(0u006a) # j - AddPosSub(lookupSub, glyphName) - # 演算子を上下に移動 math = [0u002a, 0u002b, 0u002d, 0u003c,\ 0u003d, 0u003e, 0u00d7, 0u00f7,\