Skip to main content

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

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docx_ea_font-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

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

Hashes for docx_ea_font-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b9c0e7fe55010cf9e2a5dccfd29f46d608e4d2c99153182cd71962d687975b0a
MD5 0635e2b24463d0b050085283155d4c7c
BLAKE2b-256 80d516e2c0e998b5d161e85083fd818402b9b74adcb212f06d2a646cc04dc57d

See more details on using hashes here.

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

Hashes for docx_ea_font-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa2bd29bd02e471bc259c8395d8a48ef18a89128e8420ebf73780bc5ac73782
MD5 697b7565569eaa194e04e21844ca2f66
BLAKE2b-256 d1fb94a477f781d2a16cb4de6518cc75b6d708fab5505bfa603889092f315dd8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page