semvec/pypi-packages huggingface dataset:
pptx-ea-font 0.0.4
Set east asia font in pptx correctly.
License: MIT
Requires Python: >=3.8

# 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

```Python
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')
```