Sitelet https://web.archive.org/web/20220623185320/https://github.com/python-openxml/python-docx/pull/329
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

east asia, chinese font family #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonzhu211
Copy link

@leonzhu211 leonzhu211 commented Oct 26, 2016

My test code is like this:
styles = document.styles
s1 = styles.add_style('s1', WD_STYLE_TYPE.PARAGRAPH)
s1.font.size = Pt(40)
s1.font.name = u'楷体_GB2312'
document.add_paragraph(u'中文内容', style = s1)

The chinese font family name has no effect.
So I create a docx file with the goal content, unzip it and compare the xml with that generated by python-docx. I find that the difference is the following fragment:

<w:rFonts w:eastAsia="楷体_GB2312" w:asciiTheme="minorAscii" w:hAnsiTheme="minorAscii"/>/w:rPr

That's why I add the property 'eastAsia'.

fengdasuk19 added a commit to fengdasuk19/python-docx that referenced this issue Feb 13, 2020
@fengdasuk19
Copy link

@fengdasuk19 fengdasuk19 commented Feb 13, 2020

The unit test code has been updated in PR #781 .

@ruixingw
Copy link

@ruixingw ruixingw commented Oct 26, 2021

are we ready to merge this (and also #781 )?

@leonzhu211
Copy link
Author

@leonzhu211 leonzhu211 commented Oct 28, 2021

@ruixingw
Copy link

@ruixingw ruixingw commented Oct 28, 2021

@scanny
Copy link
Contributor

@scanny scanny commented Oct 28, 2021

We generally don't accept pull requests. The engineering standard is generally just too high and almost all PRs require more rework than implementing ourselves from scratch. For example, this one includes no analysis documentation, no tests, and the CI tests fail.

If you want to merge code, best thing is probably to fork and use a private version. New versions are relatively infrequent and most can be merged or rebased onto without too much trouble.

At the same time, we welcome PRs because they often inform features that are later built and can be informative or useful to others who want the same feature and are willing to work from a private fork.

@ruixingw
Copy link

@ruixingw ruixingw commented Oct 29, 2021

sounds good. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants