pptx-ea-font
Fix the problem that the setting of East Asian fonts in python-pptx is invalid or incorrect.
修正 python-pptx 中东亚字体设置无效、不正确的问题。
Installation
pip install pptx-ea-font
Example
from pptx import Presentation
import pptx_ea_font
prs = Presentation('演示文稿.pptx')
for slide in prs.slides:
for shape in slide.shapes:
if shape.has_text_frame:
text_frame = shape.text_frame
for paragraph in text_frame.paragraphs:
for run in paragraph.runs:
pptx_ea_font.set_font(run, '微软雅黑') # 传入一个 run 对象以及字体名称
prs.save('字体修改版.pptx')
Metadata
Release files for pptx-ea-font 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pptx_ea_font-0.0.4.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pptx_ea_font-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / pptx_ea_font-0.0.4.tar.gz
| Download URL | pptx_ea_font-0.0.4.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a1fed96e09ec8c40e9373a3b5ec05321abb4cc77b58e9499946d304101b3d57
|
|
BLAKE2b-256 checksum How to use checksums |
91a58aa15334814fcf207b732d536b78e8ddc4037b2b9574af88712d6eb90c00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.19.1 CPython/3.11.6 Windows/10
|
Release files / pptx_ea_font-0.0.4-py3-none-any.whl
| Download URL | pptx_ea_font-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53016eb69d46bf6e110d772cfd94d67a2c6d61d7fe1bf23baacd8ce8e329c8c2
|
|
BLAKE2b-256 checksum How to use checksums |
e99e3ea67598d70baf4ca137c59d6e153da4afda697e82049648d0a5ebcf7fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.19.1 CPython/3.11.6 Windows/10
|