Repository: ayaka14732/FanWunHak Branch: main Commit: 45f88ac74cb1 Files: 10 Total size: 21.9 KB Directory structure: gitextract_9714tss3/ ├── .github/ │ └── workflows/ │ └── build.yml ├── .gitignore ├── LICENSE ├── README.md ├── build.sh ├── config/ │ ├── name-twp.json │ └── name.json ├── requirements.txt └── test/ ├── index.css └── index.html ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/build.yml ================================================ name: Build on: push jobs: build: runs-on: macos-latest steps: - uses: actions/checkout@v2 - name: Install otfcc run: | brew tap caryll/tap brew install otfcc-mac64 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip pip install "opencc<1.2" pip install -r requirements.txt - name: Build run: | ./build.sh - name: Copy license file run: cp LICENSE output - name: Upload font files uses: actions/upload-artifact@v2 with: name: FanWunHak path: output/* ================================================ FILE: .gitignore ================================================ .vscode .mypy_cache __pycache__ /fonts /output ================================================ FILE: LICENSE ================================================ This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: README.md ================================================ # Fan Wun Hak 繁媛黑體 [![](https://github.com/ayaka14732/FanWunHak/workflows/Build/badge.svg)](https://github.com/ayaka14732/FanWunHak/actions?query=workflow%3ABuild) ![](demo.png) Fan Wun Hak is a Simplified-Chinese-to-Traditional-Chinese font based on [GenYoGothic](https://github.com/ButTaiwan/genyog-font). This font can handle the one-to-many problem in the conversion between Simplified Chinese and Traditional Chinese. GenYoGothic itself is a free font based on Source Han Sans.
「繁媛黑體」是基於[源樣黑體](https://github.com/ButTaiwan/genyog-font)開發的簡轉繁字型,能處理「一簡對多繁」。源樣黑體是基於思源黑體的開放原始碼字型。 ## Design 設計 See [_Correctly Implement a Simplified-Chinese-To-Traditional-Chinese Font_](https://ayaka.shn.hk/s2tfont/hant/) (in Chinese).
參見[《正確實現簡轉繁字型》](https://ayaka.shn.hk/s2tfont/hant/)。 ## Download 下載 See [release page](https://github.com/ayaka14732/FanWunHak/releases).
見[發佈頁](https://github.com/ayaka14732/FanWunHak/releases)。 ## Build 構建 See [build script](.github/workflows/build.yml).
參見[建置腳本](.github/workflows/build.yml)。 ## License 授權條款 This Font Software is licensed under the SIL Open Font License, Version 1.1.
本字型以 SIL Open Font License 版本 1.1 發佈。 ## See Also 另見 Serif font: [Fan Wun Ming](https://github.com/ayaka14732/FanWunMing).
襯線字體:[繁媛明朝](https://github.com/ayaka14732/FanWunMing)。 ================================================ FILE: build.sh ================================================ #!/bin/sh set -e # Download source mkdir -p fonts wget -nc -P fonts https://github.com/ButTaiwan/genyog-font/releases/download/v1.501/GenYoGothic.zip unzip -n fonts/GenYoGothic.zip "*.ttc" -d fonts # Generate fonts font_version=1.007 mkdir -p output for input_file in fonts/*.ttc; do output_file=$(echo $input_file | sed -e 's#fonts/GenYoGothic-\(.*\).ttc#output/FanWunHak-\1.ttf#g') output_file_twp=$(echo $input_file | sed -e 's#fonts/GenYoGothic-\(.*\).ttc#output/FanWunHak-TW-\1.ttf#g') # no-twp python -m OpenCCFontGenerator \ -i $input_file \ -o $output_file \ -n config/name.json \ --ttc-index=0 \ --font-version=$font_version # twp python -m OpenCCFontGenerator \ -i $input_file \ -o $output_file_twp \ -n config/name-twp.json \ --ttc-index=0 \ --font-version=$font_version \ --twp done ================================================ FILE: config/name-twp.json ================================================ [ { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 1, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 4, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 16, "nameString": "繁媛黑體 TW" }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 0, "nameString": "Copyright © 2020-2021 Ayaka Mikazuki." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 1, "nameString": "Fan Wun Hak TW " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 3, "nameString": "Fan Wun Hak TW :Version " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 4, "nameString": "Fan Wun Hak TW " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 5, "nameString": "Version ;" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 6, "nameString": "FanWunHak-TW-" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 9, "nameString": "Fan Wun Hak TW is a font software designed by Ayaka MIKAZUKI 三日月綾香.\r\nThe font is derived from GenYoGothic TW, designed by ButTaiwan.\r\nGenYoGothic TW is derived from Source Han Sans, designed by Ryoko NISHIZUKA 西塚涼子 (kana & ideographs); Frank Grießhammer (Latin, Greek & Cyrillic); Wenlong ZHANG 张文龙 (bopomofo); Sandoll Communications 산돌커뮤니케이션, Soohyun PARK 박수현, Yejin WE 위예진 & Donghoon HAN 한동훈 (hangul elements, letters & syllables)." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 12, "nameString": "https://ayaka.shn.hk/" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 13, "nameString": "This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 14, "nameString": "http://scripts.sil.org/OFL" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 16, "nameString": "Fan Wun Hak TW" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 1, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 4, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 16, "nameString": "繁媛黑體 TW" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 1, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 4, "nameString": "繁媛黑體 TW " }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 16, "nameString": "繁媛黑體 TW" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 17, "nameString": "" } ] ================================================ FILE: config/name.json ================================================ [ { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 1, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 4, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 16, "nameString": "繁媛黑體" }, { "platformID": 3, "encodingID": 1, "languageID": 1028, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 0, "nameString": "Copyright © 2020-2021 Ayaka Mikazuki." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 1, "nameString": "Fan Wun Hak " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 3, "nameString": "Fan Wun Hak :Version " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 4, "nameString": "Fan Wun Hak " }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 5, "nameString": "Version ;" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 6, "nameString": "FanWunHak-" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 9, "nameString": "Fan Wun Hak is a font software designed by Ayaka MIKAZUKI 三日月綾香.\r\nThe font is derived from GenYoGothic TW, designed by ButTaiwan.\r\nGenYoGothic TW is derived from Source Han Sans, designed by Ryoko NISHIZUKA 西塚涼子 (kana & ideographs); Frank Grießhammer (Latin, Greek & Cyrillic); Wenlong ZHANG 张文龙 (bopomofo); Sandoll Communications 산돌커뮤니케이션, Soohyun PARK 박수현, Yejin WE 위예진 & Donghoon HAN 한동훈 (hangul elements, letters & syllables)." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 12, "nameString": "https://ayaka.shn.hk/" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 13, "nameString": "This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the SIL Open Font License for the specific language, permissions and limitations governing your use of this Font Software." }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 14, "nameString": "http://scripts.sil.org/OFL" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 16, "nameString": "Fan Wun Hak" }, { "platformID": 3, "encodingID": 1, "languageID": 1033, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 1, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 4, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 16, "nameString": "繁媛黑體" }, { "platformID": 3, "encodingID": 1, "languageID": 2052, "nameID": 17, "nameString": "" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 1, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 2, "nameString": "Regular" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 4, "nameString": "繁媛黑體 " }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 16, "nameString": "繁媛黑體" }, { "platformID": 3, "encodingID": 1, "languageID": 3076, "nameID": 17, "nameString": "" } ] ================================================ FILE: requirements.txt ================================================ git+git://github.com/ayaka14732/opencc-font-generator@61bcf3a#egg=OpenCCFontGenerator ================================================ FILE: test/index.css ================================================ @font-face { font-family: "FanWunHak-Test"; font-weight: 100; src: url("../output/FanWunHak-EL.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 300; src: url("../output/FanWunHak-L.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 400; src: url("../output/FanWunHak-N.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 500; src: url("../output/FanWunHak-R.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 600; src: url("../output/FanWunHak-M.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 700; src: url("../output/FanWunHak-B.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test"; font-weight: 900; src: url("../output/FanWunHak-H.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 100; src: url("../output/FanWunHak-TW-EL.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 300; src: url("../output/FanWunHak-TW-L.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 400; src: url("../output/FanWunHak-TW-N.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 500; src: url("../output/FanWunHak-TW-R.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 600; src: url("../output/FanWunHak-TW-M.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 700; src: url("../output/FanWunHak-TW-B.ttf") format("truetype"); } @font-face { font-family: "FanWunHak-Test-TW"; font-weight: 900; src: url("../output/FanWunHak-TW-H.ttf") format("truetype"); } :lang(en) { font-family: sans-serif, sans-serif; } :lang(zh-CN) { font-family: 'FanWunHak-Test', serif; } :lang(zh-CN).tw { font-family: 'FanWunHak-Test-TW', serif; } .w100 { font-weight: 100; } .w300 { font-weight: 300; } .w400 { font-weight: 400; } .w500 { font-weight: 500; } .w600 { font-weight: 600; } .w700 { font-weight: 700; } .w900 { font-weight: 900; } ================================================ FILE: test/index.html ================================================ 繁媛黑體字体测试页

繁媛黑體字体测试页

测试基本功能

错综复杂

错综复杂

测试一简对多繁

松赞干布

松赞干布

夸夸其谈

夸夸其谈

夸父逐日

夸父逐日

之子于归,远送于野

之子于归,远送于野

我干什么不干你事

我干什么不干你事

我发现太后的头发很干燥

我发现太后的头发很干燥

赞叹沙河涌汹涌的波浪

赞叹沙河涌汹涌的波浪

经理发现理发的人不多

经理发现理发的人不多

测试正向最长匹配

下面

下面

下面条

下面条

测试台湾字词转换

在搜索字段使用通配符

在搜索字段使用通配符

开放源代码的简转繁字体

开放源代码的简转繁字体

鼠标里面的硅二极管坏了,导致光标分辨率降低

鼠标里面的硅二极管坏了,导致光标分辨率降低

我们在老挝的服务器的硬盘需要使用互联网算法软件解决异步的问题

我们在老挝的服务器的硬盘需要使用互联网算法软件解决异步的问题

为什么你在床里面睡着?

为什么你在床里面睡着?

他站起来问:“老师,‘有条不紊’的‘紊’是什么意思?”

他站起来问:“老师,‘有条不紊’的‘紊’是什么意思?”

台式机

台式机

着装污染虚伪发泄棱柱群众里面

着装污染虚伪发泄棱柱群众里面

内存

内存

海内存知己

海内存知己

测试收字范围 (#3)

测试非简体字 (#7)

测试七种字重

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。

朱轩荫兰皋,翠幕映洛湄。