Skip to content

Commit

Permalink
fix: Downgrade IBM Plex Sans JP to version v1.001 to address some gly…
Browse files Browse the repository at this point in the history
…ph missing issues, and make necessary adjustments.
  • Loading branch information
yuru7 committed Jan 6, 2025
1 parent b436dd0 commit 75387b8
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
VERSION = v2.0.0
VERSION = v2.0.1
FONT_NAME = PlemolJP
JP_FONT = IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-{style}.ttf
ENG_FONT = IBM-Plex-Mono/IBMPlexMono-{style}.ttf
Expand Down
51 changes: 30 additions & 21 deletions fontforge_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,13 @@ def adjust_some_glyph(jp_font, eng_font, style="Regular"):
("unicode", "ranges"), 0x2018, 0x2019
).byGlyphs:
glyph.transform(psMat.scale(1.25, 1.25))
glyph.transform(psMat.translate(0, -150))
glyph.transform(psMat.translate((full_width - glyph.width) / 2, -150))
glyph.width = full_width
for glyph in jp_font.selection.select(
("unicode", "ranges"), 0x201C, 0x201D
).byGlyphs:
glyph.transform(psMat.scale(1.25, 1.25))
glyph.transform(psMat.translate(0, -150))
glyph.transform(psMat.translate((full_width - glyph.width) / 2, -150))
glyph.width = full_width

# Cent Sign, Pound Sign, Yen Sign は半角記号に IBM Plex Sans JP を使用
Expand Down Expand Up @@ -560,28 +560,44 @@ def delete_not_console_glyphs(eng_font):

# 記号
eng_font.selection.select(("more", "unicode", "ranges"), 0x00A1, 0x00A5)
eng_font.selection.select(("more", "unicode", "ranges"), 0x00A7, 0x00B8)
eng_font.selection.select(("more", "unicode", "ranges"), 0x00A7, 0x00AA)
eng_font.selection.select(("more", "unicode", "ranges"), 0x00AC, 0x00B8)
eng_font.selection.select(("more", "unicode"), 0x00D7)
eng_font.selection.select(("more", "unicode"), 0x00F7)
eng_font.selection.select(("more", "unicode"), 0x0401)
eng_font.selection.select(("more", "unicode", "ranges"), 0x0410, 0x044F)
eng_font.selection.select(("more", "unicode"), 0x0451)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2010, 0x2026)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2030, 0x2044)
eng_font.selection.select(("more", "unicode"), 0x2030)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2032, 0x2033)
eng_font.selection.select(("more", "unicode"), 0x203B)
eng_font.selection.select(("more", "unicode"), 0x203E)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2113, 0x2122)
eng_font.selection.select(("more", "unicode"), 0x2202)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2211, 0x222B)
# 矢印
eng_font.selection.select(("more", "unicode", "ranges"), 0x2190, 0x2199)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21A9, 0x21AA)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21B0, 0x21B3)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21B6, 0x21B7)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21BA, 0x21BB)
# TODO: IBM Plex Sans JP v1.002 へバージョンアップすると矢印が拡張される見込みだが、当該バージョンには一部グリフ欠けがあるためさらに上のバージョンが出てきた際に取り込む
eng_font.selection.select(("more", "unicode", "ranges"), 0x2190, 0x2193)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21C4, 0x21C6)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2B0E, 0x2B0F)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2B10, 0x2B11)
eng_font.selection.select(("more", "unicode"), 0x21D2)
eng_font.selection.select(("more", "unicode"), 0x21D4)
eng_font.selection.select(("more", "unicode", "ranges"), 0x21E6, 0x21E9)
eng_font.selection.select(("more", "unicode"), 0x21F5)

# 数学記号
eng_font.selection.select(("more", "unicode"), 0x2260)
eng_font.selection.select(("more", "unicode"), 0x2200)
eng_font.selection.select(("more", "unicode"), 0x2202)
eng_font.selection.select(("more", "unicode"), 0x2211)
eng_font.selection.select(("more", "unicode"), 0x2219)
eng_font.selection.select(("more", "unicode"), 0x221A)
eng_font.selection.select(("more", "unicode", "ranges"), 0x221D, 0x2220)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2227, 0x222E)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2234, 0x2235)
eng_font.selection.select(("more", "unicode"), 0x2252)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2260, 0x2261)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2266, 0x2267)
eng_font.selection.select(("more", "unicode", "ranges"), 0x226A, 0x226B)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2282, 0x2283)
eng_font.selection.select(("more", "unicode", "ranges"), 0x2286, 0x2287)

# 一部 IBMPlexMono ベースにする
# 各エディタの可視化文字対策
eng_font.selection.select(("less", "unicode"), 0x2022)
Expand All @@ -590,13 +606,6 @@ def delete_not_console_glyphs(eng_font):
eng_font.selection.select(("less", "unicode"), 0x2219)
eng_font.selection.select(("less", "unicode"), 0x25D8)
eng_font.selection.select(("less", "unicode"), 0x25E6)
# IBM Plex Sans JP 等幅化対策 (IBM Plex Mono を適用して半角化)
eng_font.selection.select(("less", "unicode"), 0xAB)
eng_font.selection.select(("less", "unicode"), 0xBB)
# flaction slash
eng_font.selection.select(("less", "unicode"), 0x2044)
# broken bar
eng_font.selection.select(("less", "unicode"), 0x00A6)

for glyph in eng_font.selection.byGlyphs:
glyph.clear()
Expand Down
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Bold.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-ExtraLight.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Light.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Medium.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Regular.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-SemiBold.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Text.ttf
Binary file not shown.
Binary file modified source/IBM-Plex-Sans-JP/unhinted/IBMPlexSansJP-Thin.ttf
Binary file not shown.

0 comments on commit 75387b8

Please sign in to comment.