Set east asia font in docx correctly.
Project description
docx-ea-font
Fix the problem that the setting of East Asian fonts in python-docx is invalid or incorrect.
修正 python-docx 中东亚字体设置无效、不正确的问题。
Installation
pip install docx-ea-font
Example
from docx import Document
import docx_ea_font
doc = Document("tests/test.docx")
for paragraph in doc.paragraphs:
for run in paragraph.runs:
docx_ea_font.set_font(run, "楷体") # 传入一个 run 对象以及字体名称
doc.save('font-changed.docx')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docx_ea_font-0.0.1.tar.gz
(2.2 kB
view details)
Built Distribution
File details
Details for the file docx_ea_font-0.0.1.tar.gz
.
File metadata
- Download URL: docx_ea_font-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.11.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9c0e7fe55010cf9e2a5dccfd29f46d608e4d2c99153182cd71962d687975b0a |
|
MD5 | 0635e2b24463d0b050085283155d4c7c |
|
BLAKE2b-256 | 80d516e2c0e998b5d161e85083fd818402b9b74adcb212f06d2a646cc04dc57d |
File details
Details for the file docx_ea_font-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: docx_ea_font-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.11.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fa2bd29bd02e471bc259c8395d8a48ef18a89128e8420ebf73780bc5ac73782 |
|
MD5 | 697b7565569eaa194e04e21844ca2f66 |
|
BLAKE2b-256 | d1fb94a477f781d2a16cb4de6518cc75b6d708fab5505bfa603889092f315dd8 |