Skip to content

Commit def6d2b

Browse files
committed
fix: Fixed the alignment of ",(U+FF0C)" and ".(U+FF0E)" which were slightly too far to the left.
1 parent 75387b8 commit def6d2b

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

build.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[DEFAULT]
2-
VERSION = v2.0.1
2+
VERSION = v2.0.2
33
FONT_NAME = PlemolJP
44
JP_FONT = IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-{style}.ttf
55
ENG_FONT = IBM-Plex-Mono/IBMPlexMono-{style}.ttf

fontforge_script.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,9 @@ def adjust_some_glyph(jp_font, eng_font, style="Regular"):
378378
# 全角ピリオド、カンマを拡大する
379379
for glyph in jp_font.selection.select(("unicode", None), 0xFF0E).byGlyphs:
380380
glyph.transform(psMat.scale(1.45, 1.45))
381-
glyph.transform(psMat.translate((full_width - glyph.width) / 2, 0))
382381
glyph.width = full_width
383382
for glyph in jp_font.selection.select(("unicode", None), 0xFF0C).byGlyphs:
384383
glyph.transform(psMat.scale(1.40, 1.40))
385-
glyph.transform(psMat.translate((full_width - glyph.width) / 2, 0))
386384
glyph.width = full_width
387385
# LEFT SINGLE QUOTATION MARK (U+2018) ~ DOUBLE LOW-9 QUOTATION MARK (U+201E) の幅を全角幅にする
388386
for glyph in jp_font.selection.select(
@@ -422,15 +420,15 @@ def adjust_some_glyph(jp_font, eng_font, style="Regular"):
422420
for uni in [*range(0x21CD, 0x21CF + 1), 0x21D0, 0x21D2, 0x21D4, 0x21DA, 0x21DB]:
423421
eng_font.selection.select(("unicode", None), uni)
424422
for glyph in eng_font.selection.byGlyphs:
425-
scale_glyph(glyph, 1, 1.3)
423+
scale_glyph_from_center(glyph, 1, 1.3)
426424
for uni in [0x21D1, 0x21D3]:
427425
eng_font.selection.select(("unicode", None), uni)
428426
for glyph in eng_font.selection.byGlyphs:
429-
scale_glyph(glyph, 1.3, 1)
427+
scale_glyph_from_center(glyph, 1.3, 1)
430428
for uni in range(0x21D6, 0x21D9 + 1):
431429
eng_font.selection.select(("unicode", None), uni)
432430
for glyph in eng_font.selection.byGlyphs:
433-
scale_glyph(glyph, 1.3, 1.3)
431+
scale_glyph_from_center(glyph, 1.3, 1.3)
434432

435433
# 選択解除
436434
jp_font.selection.none()
@@ -887,8 +885,8 @@ def add_console_glyphs(eng_font):
887885
eng_font.selection.none()
888886

889887

890-
def scale_glyph(glyph, scale_x, scale_y):
891-
"""グリフのスケールを調整する"""
888+
def scale_glyph_from_center(glyph, scale_x, scale_y):
889+
"""グリフの中心位置を基点としたスケール調整"""
892890
original_width = glyph.width
893891
# スケール前の中心位置を求める
894892
before_bb = glyph.boundingBox()
@@ -938,7 +936,7 @@ def down_scale_redundant_size_glyph(eng_font):
938936
0x2591 <= glyph.unicode <= 0x2593
939937
) # SHADE グリフ 0x2591 - 0x2593 は無視
940938
):
941-
scale_glyph(glyph, 1 + (xmin / glyph.width) * 2, 1)
939+
scale_glyph_from_center(glyph, 1 + (xmin / glyph.width) * 2, 1)
942940

943941

944942
def add_nerd_font_glyphs(jp_font, eng_font):

0 commit comments

Comments
 (0)