mfont 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mfont-0.1.1/PKG-INFO +12 -0
- mfont-0.1.1/README.md +4 -0
- mfont-0.1.1/pyproject.toml +9 -0
- {mfont-0.1.0 → mfont-0.1.1/src}/mfont/__init__.py +2 -1
- {mfont-0.1.0 → mfont-0.1.1/src}/mfont/load_font.py +6 -1
- mfont-0.1.1/src/mfont.egg-info/PKG-INFO +12 -0
- mfont-0.1.1/src/mfont.egg-info/SOURCES.txt +9 -0
- mfont-0.1.0/PKG-INFO +0 -12
- mfont-0.1.0/README.md +0 -18
- mfont-0.1.0/mfont/fonts/FangZhengHeiTiJianTi-1.ttf +0 -0
- mfont-0.1.0/mfont/fonts/LXGWWenKaiGBLite-Regular.ttf +0 -0
- mfont-0.1.0/mfont.egg-info/PKG-INFO +0 -12
- mfont-0.1.0/mfont.egg-info/SOURCES.txt +0 -11
- mfont-0.1.0/setup.py +0 -18
- {mfont-0.1.0 → mfont-0.1.1}/setup.cfg +0 -0
- {mfont-0.1.0 → mfont-0.1.1/src}/mfont.egg-info/dependency_links.txt +0 -0
- {mfont-0.1.0 → mfont-0.1.1/src}/mfont.egg-info/requires.txt +0 -0
- {mfont-0.1.0 → mfont-0.1.1/src}/mfont.egg-info/top_level.txt +0 -0
mfont-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mfont
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: matplotlib
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# v0.1.1
|
|
11
|
+
🧹 默认字体从 `lgx` 改为 宋体 + `roman`
|
|
12
|
+
字体来源 [AaaGss/Font_RomanSong](https://github.com/AaaGss/Font_RomanSong) 组合字体
|
mfont-0.1.1/README.md
ADDED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""
|
|
2
2
|
快速加载字体工具
|
|
3
3
|
|
|
4
|
-
- mfont.load_font -
|
|
4
|
+
- mfont.load_font 加载 宋体 + roman - fonts from [https://github.com/AaaGss/Font_RomanSong]
|
|
5
|
+
- mfont.load_font.load_lxg - 加载 LXGW 字体
|
|
5
6
|
- mfont.load_font.load_heiti() # 加载方正黑体
|
|
6
7
|
- mfont.load_font.reset_font() # 重新加载 LXGW 字体
|
|
7
8
|
- mfont.load_font.switch(xxx) # 加载本地字体
|
|
@@ -9,7 +9,8 @@ FONT_DIR = Path(__file__).parent / "fonts"
|
|
|
9
9
|
def _auto_configure(debug: bool=False):
|
|
10
10
|
# font_dir_path = get_font_ttf_path()
|
|
11
11
|
font_files = font_manager.findSystemFonts(fontpaths=str(FONT_DIR))
|
|
12
|
-
FONT_NAME = "LXGW WenKai GB Lite"
|
|
12
|
+
# FONT_NAME = "LXGW WenKai GB Lite"
|
|
13
|
+
FONT_NAME = "RomanSong"
|
|
13
14
|
|
|
14
15
|
if debug:
|
|
15
16
|
# 开发模式,打印字体名
|
|
@@ -36,6 +37,10 @@ def switch(fpath: str|Path):
|
|
|
36
37
|
def reset_font():
|
|
37
38
|
_auto_configure()
|
|
38
39
|
|
|
40
|
+
def load_lxg():
|
|
41
|
+
FONT_NAME = "LXGW WenKai GB Lite"
|
|
42
|
+
matplotlib.rc('font', family=FONT_NAME)
|
|
43
|
+
|
|
39
44
|
def load_heiti():
|
|
40
45
|
FONT_NAME = "FZHei-B01S"
|
|
41
46
|
matplotlib.rc('font', family=FONT_NAME)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mfont
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: matplotlib
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# v0.1.1
|
|
11
|
+
🧹 默认字体从 `lgx` 改为 宋体 + `roman`
|
|
12
|
+
字体来源 [AaaGss/Font_RomanSong](https://github.com/AaaGss/Font_RomanSong) 组合字体
|
mfont-0.1.0/PKG-INFO
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mfont
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: 简洁的 matplotlib 中文字体加载工具
|
|
5
|
-
Author: zsiven
|
|
6
|
-
Author-email:
|
|
7
|
-
Requires-Python: >=3.11
|
|
8
|
-
Requires-Dist: matplotlib
|
|
9
|
-
Dynamic: author
|
|
10
|
-
Dynamic: requires-dist
|
|
11
|
-
Dynamic: requires-python
|
|
12
|
-
Dynamic: summary
|
mfont-0.1.0/README.md
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mfont
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: 简洁的 matplotlib 中文字体加载工具
|
|
5
|
-
Author: zsiven
|
|
6
|
-
Author-email:
|
|
7
|
-
Requires-Python: >=3.11
|
|
8
|
-
Requires-Dist: matplotlib
|
|
9
|
-
Dynamic: author
|
|
10
|
-
Dynamic: requires-dist
|
|
11
|
-
Dynamic: requires-python
|
|
12
|
-
Dynamic: summary
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
setup.py
|
|
3
|
-
mfont/__init__.py
|
|
4
|
-
mfont/load_font.py
|
|
5
|
-
mfont.egg-info/PKG-INFO
|
|
6
|
-
mfont.egg-info/SOURCES.txt
|
|
7
|
-
mfont.egg-info/dependency_links.txt
|
|
8
|
-
mfont.egg-info/requires.txt
|
|
9
|
-
mfont.egg-info/top_level.txt
|
|
10
|
-
mfont/fonts/FangZhengHeiTiJianTi-1.ttf
|
|
11
|
-
mfont/fonts/LXGWWenKaiGBLite-Regular.ttf
|
mfont-0.1.0/setup.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, find_packages
|
|
2
|
-
|
|
3
|
-
setup(
|
|
4
|
-
name="mfont",
|
|
5
|
-
version="0.1.0",
|
|
6
|
-
author="zsiven",
|
|
7
|
-
author_email="",
|
|
8
|
-
description="简洁的 matplotlib 中文字体加载工具",
|
|
9
|
-
packages=find_packages(),
|
|
10
|
-
install_requires=[
|
|
11
|
-
"matplotlib",
|
|
12
|
-
],
|
|
13
|
-
package_data={
|
|
14
|
-
"mfont": ["fonts/*.ttf"],
|
|
15
|
-
},
|
|
16
|
-
include_package_data=True,
|
|
17
|
-
python_requires=">=3.11",
|
|
18
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|