Skip to content

Commit

Permalink
Merge pull request #13 from MaruTama/fix_height_setting
Browse files Browse the repository at this point in the history
Fix height setting for windows
  • Loading branch information
MaruTama authored Aug 20, 2023
2 parents 0305392 + 51aceb3 commit 987d129
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ OSS の多音字に対応した拼音フォント及びその作成ツールで
**[Download/下载](https://github.com/MaruTama/pinyin-font-tools/releases)**
<!-- [![Download/下载](https://img.shields.io/badge/Download-↓-yellow.svg)](https://github.com/MaruTama/pinyin-font-tools/releases) -->

[![version](https://img.shields.io/badge/Version-1.02-brightgreen.svg)](https://github.com/nongthaihoang/custom_font_installer/releases/tag/v1.02)
![updated](https://img.shields.io/badge/Updated-Dec_19,_2020-green.svg)
[![version](https://img.shields.io/badge/Version-1.03-brightgreen.svg)](https://github.com/nongthaihoang/custom_font_installer/releases/tag/v1.03)
![updated](https://img.shields.io/badge/Updated-Aug_21,_2023-green.svg)

![explain_han_serif](./imgs/explain_han_serif.png)
![explain_handwritten](./imgs/explain_handwritten.png)
Expand Down Expand Up @@ -72,6 +72,7 @@ You can also use Unicode IVS (ideographic variant selector) to switch other diff
# 謝辞 / Acknowledgments
Thank you to the following people and repositories.
- [@NightFurySL2001](https://github.com/NightFurySL2001)-san
- [@lanyizi](https://github.com/lanyizi)-san
- [BPMF IVS](https://github.com/ButTaiwan/bpmfvs)
- [kose-font](https://github.com/lxgw/kose-font)
- [SetoFontSP](https://ja.osdn.net/projects/setofont/releases/p14368)
Expand Down
Binary file modified outputs/Mengshen-Handwritten.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

METADATA_FOR_HANDWRITTEN = {
"pinyin_canvas":{
"width" : 800, # ピンイン表示部の幅
"width" : 800, # ピンイン表示部の幅
"height" : 300, # ピンイン表示部の高さ
"base_line": 920, # ベースラインからの高さ
"base_line": 880, # ベースラインからの高さ
"tracking" : 5 # 拼音の標準空白幅: Tracking is about uniform spacing across a text selection.
},
"expected_hanzi_canvas":{
Expand Down
3 changes: 2 additions & 1 deletion src/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,13 @@ def set_about_size(self):
if advanceAddedPinyinHeight > self.marged_font["hhea"]["ascender"]:
# 原点からグリフの上端までの距離
self.marged_font["hhea"]["ascender"] = advanceAddedPinyinHeight
self.marged_font["OS_2"]["usWinAscent"] = advanceAddedPinyinHeight
# 特定の言語のベースライン
# self.marged_font["BASE"]["hani"]

def set_copyright(self):
# フォント製作者によるバージョン
self.marged_font["head"]["fontRevision"] = name_table.VISION
self.marged_font["head"]["fontRevision"] = name_table.VERSION
# 作成日(基準日:1904/01/01 00:00 GMT)
from datetime import datetime
base_date = datetime.strptime("1904/01/01 00:00", "%Y/%m/%d %H:%M")
Expand Down
18 changes: 9 additions & 9 deletions src/name_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#!/usr/bin/env python'


VISION = 1.02
VERSION = 1.03

'''
platformID
Expand Down Expand Up @@ -66,7 +66,7 @@
"languageID": 0,
"nameID": 3,
# フォント識別子
"nameString": "{};MENGSHEN;Mengshen-HanSerif".format(VISION)
"nameString": "{};MENGSHEN;Mengshen-HanSerif".format(VERSION)
},
{
"platformID": 1,
Expand All @@ -82,7 +82,7 @@
"languageID": 0,
"nameID": 5,
# バージョン文字列
"nameString": "Version {}".format(VISION)
"nameString": "Version {}".format(VERSION)
},
{
"platformID": 1,
Expand Down Expand Up @@ -178,7 +178,7 @@
"languageID": 1033,
"nameID": 3,
# フォント識別子
"nameString": "{};MENGSHEN;Mengshen-HanSerif".format(VISION)
"nameString": "{};MENGSHEN;Mengshen-HanSerif".format(VERSION)
},
{
"platformID": 3,
Expand All @@ -194,7 +194,7 @@
"languageID": 1033,
"nameID": 5,
# バージョン文字列
"nameString": "Version {}".format(VISION)
"nameString": "Version {}".format(VERSION)
},
{
"platformID": 3,
Expand Down Expand Up @@ -300,7 +300,7 @@
"languageID": 0,
"nameID": 3,
# フォント識別子
"nameString": "{};MENGSHEN;Mengshen-Handwritten".format(VISION)
"nameString": "{};MENGSHEN;Mengshen-Handwritten".format(VERSION)
},
{
"platformID": 1,
Expand All @@ -316,7 +316,7 @@
"languageID": 0,
"nameID": 5,
# バージョン文字列
"nameString": "Version {}".format(VISION)
"nameString": "Version {}".format(VERSION)
},
{
"platformID": 1,
Expand Down Expand Up @@ -381,7 +381,7 @@
"languageID": 1033,
"nameID": 3,
# フォント識別子
"nameString": "{};MENGSHEN;Mengshen-Handwritten".format(VISION)
"nameString": "{};MENGSHEN;Mengshen-Handwritten".format(VERSION)
},
{
"platformID": 3,
Expand All @@ -397,7 +397,7 @@
"languageID": 1033,
"nameID": 5,
# バージョン文字列
"nameString": "Version {}".format(VISION)
"nameString": "Version {}".format(VERSION)
},
{
"platformID": 3,
Expand Down

0 comments on commit 987d129

Please sign in to comment.