René's URL Explorer Experiment


Title: Default template theme forces East-Asian text to fall back to MS Mincho (MS 明朝) · Issue #1601 · python-openxml/python-docx · GitHub

Open Graph Title: Default template theme forces East-Asian text to fall back to MS Mincho (MS 明朝) · Issue #1601 · python-openxml/python-docx

X Title: Default template theme forces East-Asian text to fall back to MS Mincho (MS 明朝) · Issue #1601 · python-openxml/python-docx

Description: Default template's theme forces East-Asian text to fall back to MS Mincho (MS 明朝) Summary Document() (a fresh document created from the bundled default.docx template) configures the theme and document settings so that East-Asian text res...

Open Graph Description: Default template's theme forces East-Asian text to fall back to MS Mincho (MS 明朝) Summary Document() (a fresh document created from the bundled default.docx template) configures the theme and docum...

X Description: Default template's theme forces East-Asian text to fall back to MS Mincho (MS 明朝) Summary Document() (a fresh document created from the bundled default.docx template) configures the theme and d...

Opengraph URL: https://github.com/python-openxml/python-docx/issues/1601

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default template theme forces East-Asian text to fall back to MS Mincho (MS 明朝)","articleBody":"# Default template's theme forces East-Asian text to fall back to MS Mincho (MS 明朝)\n\n## Summary\n\n`Document()` (a fresh document created from the bundled `default.docx` template) configures the\ntheme and document settings so that East-Asian text resolves to the Japanese font **MS 明朝 (MS Mincho)**,\n**even when the user never asked for a Japanese font and even after setting an explicit East-Asian\nfont with `run.font.name`.** On systems that don't have MS Mincho installed (a standard Chinese/English\nWindows), the CJK glyphs are then substituted / rendered in the wrong typeface.\n\nThis is distinct from the long-standing *API* gaps in #346 / #154 / #1396 (which are about\n`Font.name` not writing the `w:eastAsia` attribute). Those reports are about the *user-side* setter.\nThis issue is about the **default template itself shipping a mis-configured theme** that make the\nfallback land on a Japanese font.\n\n## Environment\n\n- python-docx: 1.2.0 (verified against `master`, byte-identical template)\n- Word / WPS on a Chinese-locale Windows without the MS Mincho / MS Gothic fonts installed\n\n## Reproduction\n\n```python\nfrom docx import Document\n\ndoc = Document()          # fresh document from bundled default.docx\np = doc.add_paragraph()\nrun = p.add_run(\"中文字体回退测试 Chinese 123\")\n# Default behavior - we never set any font.\ndoc.save(\"repro.docx\")\n```\n\n### The run python-docx emits\n\n```xml\n\u003cw:r>\u003cw:t>中文字体回退测试 Chinese 123\u003c/w:t>\u003c/w:r>\n```\n\nThere is **no `\u003cw:rPr>`/`\u003cw:rFonts>`** on the run at all. So the CJK glyphs must inherit from the theme.\n\n## Root cause chain (all confirmed from the shipped template)\n\nThe inherited East-Asian font resolves through this chain, and every link is wrong:\n\n1. **`word/settings.xml`** — `themeFontLang` declares the document's East-Asian language as **Japanese**:\n\n   ```xml\n   \u003cw:themeFontLang w:val=\"en-US\" w:eastAsia=\"ja-JP\"/>\n   ```\n\n2. **`word/theme/theme1.xml`** — the `minorFont` (used by Normal text via `docDefaults`) has an **empty**\n   East-Asian and complex-script typeface, and its `Jpan` script font is a Japanese face:\n\n   ```xml\n   \u003ca:minorFont>\n     \u003ca:latin typeface=\"Cambria\"/>\n     \u003ca:ea typeface=\"\"/>\n     \u003ca:cs typeface=\"\"/>\n     \u003ca:font script=\"Jpan\" typeface=\"MS 明朝\"/>\n     ...\n   \u003c/a:minorFont>\n   ```\n   (`majorFont` has the same empty `ea`/`cs` with `Jpan` = `MS ゴシック`.)\n\n3. **`word/styles.xml`** — `docDefaults` references the theme East-Asian font instead of a concrete font:\n\n   ```xml\n   \u003cw:rFonts w:asciiTheme=\"minorHAnsi\" w:eastAsiaTheme=\"minorEastAsia\" w:hAnsiTheme=\"minorHAnsi\" w:cstheme=\"minorBidi\"/>\n   ```\n\n4. **`word/fontTable.xml`** — the theme declares the Japanese faces `MS 明朝` and `MS ゴシック` as\n   real fonts (charset `0x80`), so they are treated as available.\n\n**Resolution:** run has no font → `docDefaults` gives `eastAsiaTheme=\"minorEastAsia\"` → theme `minorFont`\nEast-Asian typeface is empty → because `themeFontLang eastAsia` is `ja-JP`, the document's East-Asian\nlanguage is Japanese → the `Jpan` script font (**MS 明朝**) is selected.\n\nEven setting `run.font.name = '宋体'` does NOT fix the CJK glyphs, because python-docx only writes\n`w:ascii`/`w:hAnsi` (see #346 / #154) and the East-Asian characters still fall through to the theme's\nJapanese font.\n\n## Expected behavior\n\n- A freshly created `Document()` should not, by default, resolve CJK text to a Japanese typeface.\n- The default template should either declare a neutral/Chinese East-Asian language\n  (`w:eastAsia=\"zh-CN\"`), or specify a concrete, localizable East-Asian font in the theme's\n  `a:ea`/`a:cs` slots, so CJK glyphs don't silently fall back to MS Mincho.\n\n## Possible fix (in the bundled template)\n\n- `settings.xml`: `w:themeFontLang ... w:eastAsia=\"zh-CN\"` (or drop the Japanese default).\n- `theme1.xml`: give `a:ea`/`a:cs` a non-empty, meaningful typeface (e.g. `宋体`/`SimSun`), or point\n  `Jpan` at a font that shippers commonly have; or set these to a neutral theme-resolvable value.\n\n## Related, non-duplicate issues\n\n- #154 — feature request for `Font.name_far_east` (API does not expose East-Asian font setter)\n- #346 — `run.font.name` does not apply to Chinese characters (same API limitation)\n- #1396 — confirms `run.font.name` writes only `ascii`/`hAnsi`, never `eastAsia`\n\nThese describe the **missing `eastAsia` API**; none of them reports that the **default template itself**\nships a Japanese-language theme that makes the fallback land on MS Mincho.\n","author":{"url":"https://github.com/sebastEXlabe","@type":"Person","name":"sebastEXlabe"},"datePublished":"2026-08-27T23:48:38Z","url":"https://github.com/python-openxml/python-docx/issues/1601"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d87bd615-1a1f-5cf5-9b70-560aa472b5d0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC82:38E099:21B107:2D4FC6:6AFF638E
html-safe-nonce469d29d9bb05df200787954a484a5794600c1ef404e855523ff4a9454cad25d6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzgyOjM4RTA5OToyMUIxMDc6MkQ0RkM2OjZBRkY2MzhFIiwidmlzaXRvcl9pZCI6IjU2ODg5Njc4MjkyODIzMTcxOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac543098f39402f28ba715a270acc834fb2f8fa7e729ae0b4ab8108a97910c14dd
hovercard-subject-tagissue:5273154263
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openxml/python-docx/1601/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fd70bd02da4b85e1cd8f0a8820675a8735b715b81317609631ee4aa13c0cf3df/python-openxml/python-docx/issues/1601
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fd70bd02da4b85e1cd8f0a8820675a8735b715b81317609631ee4aa13c0cf3df/python-openxml/python-docx/issues/1601
og:image:altDefault template's theme forces East-Asian text to fall back to MS Mincho (MS 明朝) Summary Document() (a fresh document created from the bundled default.docx template) configures the theme and docum...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesebastEXlabe
hostnamegithub.com
expected-hostnamegithub.com
None41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12
turbo-cache-controlno-preview
go-importgithub.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git
octolytics-dimension-user_id3403760
octolytics-dimension-user_loginpython-openxml
octolytics-dimension-repository_id13592924
octolytics-dimension-repository_nwopython-openxml/python-docx
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id13592924
octolytics-dimension-repository_network_root_nwopython-openxml/python-docx
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8968d6d6acc65d74e4df332d23932dd3fd0502a4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-openxml/python-docx/issues/1601#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F1601
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-openxml%2Fpython-docx%2Fissues%2F1601
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-openxml%2Fpython-docx
Reloadhttps://github.com/python-openxml/python-docx/issues/1601
Reloadhttps://github.com/python-openxml/python-docx/issues/1601
Reloadhttps://github.com/python-openxml/python-docx/issues/1601
python-openxmlhttps://github.com/python-openxml
python-docxhttps://github.com/python-openxml/python-docx
Codehttps://github.com/python-openxml/python-docx
Issues387 (387)https://github.com/python-openxml/python-docx/issues
Pull requests167 (167)https://github.com/python-openxml/python-docx/pulls
Actionshttps://github.com/python-openxml/python-docx/actions
Projectshttps://github.com/python-openxml/python-docx/projects
Wikihttps://github.com/python-openxml/python-docx/wiki
Security and qualityhttps://github.com/python-openxml/python-docx/security
Insightshttps://github.com/python-openxml/python-docx/insights
https://github.com/python-openxml/python-docx
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/1601
New issuehttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/1601
Default template theme forces East-Asian text to fall back to MS Mincho (MS 明朝)https://github.com/python-openxml/python-docx/issues/1601#top
https://github.com/sebastEXlabe
sebastEXlabehttps://github.com/sebastEXlabe
on Aug 27, 2026https://github.com/python-openxml/python-docx/issues/1601#issue-5273154263
#346https://github.com/python-openxml/python-docx/issues/346
#154https://github.com/python-openxml/python-docx/issues/154
#1396https://github.com/python-openxml/python-docx/issues/1396
#346https://github.com/python-openxml/python-docx/issues/346
#154https://github.com/python-openxml/python-docx/issues/154
feature: Font.name_far_east #154https://github.com/python-openxml/python-docx/issues/154
Cannot set Chinese character font typeface #346https://github.com/python-openxml/python-docx/issues/346
Chinese fonts Only the non-Chinese parts are valid #1396https://github.com/python-openxml/python-docx/issues/1396
https://github.com/lsaint
lsainthttps://github.com/lsaint
on Aug 28, 2026https://github.com/python-openxml/python-docx/issues/1601#issuecomment-5454299134
https://github.com/lsaint/python-docx-osshttps://github.com/lsaint/python-docx-oss
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-openxml/python-docx/issues/1601
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-openxml/python-docx/issues/1601
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.