This is a program that counts the amount of CJK characters based on Unicode ranges and Chinese encoding standards.
此软件以统一码(Unicode)区块与汉字编码标准统计字体内的汉字数量。
Main repository is on GitHub. This repo will only be deleted and re-updated if I remembered to do so.
主仓库为GitHub。本仓库只在本人记得时删除重新更新。
This program accepts 1 font file at a time (OpenType/TrueType single font file currently) and extract the character list from cmap
table, which records the Unicode (base-10)-glyph shape for a font. The list is then parsed to count the amount of characters based on Unicode ranges (comparing the hexadecimal range) and Chinese encoding standards (given a list of .txt files with the actual character in it).
此软件可计算一套字体内的汉字数量,目前只限OpenType/TrueType单字体文件而已。导入字体时,软件将从cmap
表(储存字体内(十进制)统一码与字符对应的表)提取汉字列表,然后以该列表依统一码区块(比对十六进制码位)与汉字编码标准(比对 .txt文件)统计字体内的汉字数量。
Major font formats are supported in this software.
主要字体格式本软件皆都支援。
*.ttf, *.otf, *.woff, *.woff2, *.ttc, *.otc
Details of the character lists can be found in https://github.com/NightFurySL2001/cjktables.
字表详情可参见 https://github.com/NightFurySL2001/cjktables 。
GB/T 12345
*Note: Source file from character_set by @mrhso.
注:字表来源为 @mrhso character_set。
GBK
*Note: Private Use Area (PUA) characters are removed and not counted, resulting in 20923 characters.
注:不计算私用区(PUA)字符,共计20923字。
GB 18030
*Note: Mandatory section are counted only. According to GB 18030, mandatory section of a font is all CJK characters in the Basic Multilingual Plane e.g. CJK Unified Ideographs and CJK Unified Ideographs Extension A.
注:只计算强制性标准部分。依据GB 18030,字体内强制需要支援的字符范围应该是基本多文种平面(BMP)内的所有汉字,即中日韩统一表意文字与中日韩统一表意文字扩展A区。
List of Frequently Used Characters in Modern Chinese/现代汉语常用字表
*Note: Old name in this software was 3500 Commonly Used Chinese Characters.
注:旧版软件内名称为《3500字常用汉字表》。
List of Frequently Used Characters of Compulsory Education/义务教育语文课程常用字表
Chart of Standard Forms of Common National Characters/常用國字標準字體表
*Note: Old name in this software was 《台湾教育部常用字表》.
注:旧版软件内名称为《台湾教育部常用字表》。
Chart of Standard Forms of Less-Than-Common National Characters/次常用國字標準字體表
*Note: Old name in this software was 《台湾教育部次常用字表》, and was temporarily removed in v0.10 and v0.11.
注:旧版软件内名称为《台湾教育部次常用字表》,并于 0.10 版和 0.11 版暂时移除。
Supplementary Character Set (suppchara, level 1-6)/常用香港外字表(1-6级)
FounderType Simp./Trad. List 方正简繁字表
main.exe
is the English version, main-zhs.exe
is the Chinese (Simplified) version, main-zht.exe
is the Chinese (Traditional) version.
main.exe
为英文版,main-zhs.exe
为简体中文版,main-zht.exe
为繁体中文版。
tkinter
For software display. Non-commercial use module, should be removed and replaced in next version.
使用于软件显示。非商用模块,应在未来移除与替换该模块。
fontTools
Extract cmap
table.
提取 cmap
表。
pyglet
ZHT only: Set the GUI Font to custom font (Genyog).
繁中版:设置界面字体为自定义字体(源样黑体)。
pyinstaller
Build executable for Windows in release.
编译软件成可执行软件。发布版内提供 Windows 版本。
This software is licensed under MIT License. Details of the license can be found in the accompanying LICENSE
file.
本软件以 MIT 授权条款发布。授权详情可在随附的 LICENSE
文件内查阅。
Please install latest version of Python 3.
请先安装最新版本的 Python 3。
pip3 install fonttools
pip3 install pyglet
pip3 install pyinstaller
Download the required .spec
files from release.
请从发布页下载需要的 .spec
文件。
// To build single language
pyinstaller main.spec
pyinstaller main-zhs.spec
pyinstaller main-zht.spec
// To build full folder, use the provided .bat file
.\batch.bat
Refer to readme.txt. 参考readme.txt。
This program is requested by MaoKen. Visit their site to see this in action.
此软件由猫啃网要求。浏览该网址以查看使用方式。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。