Title: Chinese fonts Only the non-Chinese parts are valid · Issue #1396 · python-openxml/python-docx · GitHub
Open Graph Title: Chinese fonts Only the non-Chinese parts are valid · Issue #1396 · python-openxml/python-docx
X Title: Chinese fonts Only the non-Chinese parts are valid · Issue #1396 · python-openxml/python-docx
Description: source import docx from docx import Document print(docx.__version__) doc = Document() p = doc.add_paragraph() run = p.add_run("中文文本 1234 abcd") run.font.name = '楷体_GB2312' print(run.element.xml) print(run.element.rPr.rFonts.xml) doc.save...
Open Graph Description: source import docx from docx import Document print(docx.__version__) doc = Document() p = doc.add_paragraph() run = p.add_run("中文文本 1234 abcd") run.font.name = '楷体_GB2312' print(run.element.xml) pr...
X Description: source import docx from docx import Document print(docx.__version__) doc = Document() p = doc.add_paragraph() run = p.add_run("中文文本 1234 abcd") run.font.name = '楷体_GB2312' print(r...
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1396
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Chinese fonts Only the non-Chinese parts are valid","articleBody":"\r\n\r\n\r\n\r\n### source\r\n\r\n```\r\nimport docx\r\nfrom docx import Document\r\nprint(docx.__version__)\r\ndoc = Document()\r\np = doc.add_paragraph()\r\nrun = p.add_run(\"中文文本 1234 abcd\")\r\nrun.font.name = '楷体_GB2312'\r\nprint(run.element.xml)\r\nprint(run.element.rPr.rFonts.xml)\r\ndoc.save('b.docx')\r\n\r\n\r\n```\r\n\r\n### output\r\n\r\n```\r\n1.1.2\r\n\u003cw:r xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mo=\"http://schemas.microsoft.com/office/mac/office/2008/main\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:mv=\"urn:schemas-microsoft-com:mac:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\">\r\n \u003cw:rPr>\r\n \u003cw:rFonts w:ascii=\"楷体_GB2312\" w:hAnsi=\"楷体_GB2312\"/>\r\n \u003c/w:rPr>\r\n \u003cw:t>中文文本 1234 abcd\u003c/w:t>\r\n\u003c/w:r>\r\n\r\n\u003cw:rFonts xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mo=\"http://schemas.microsoft.com/office/mac/office/2008/main\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:mv=\"urn:schemas-microsoft-com:mac:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" xmlns:wpg=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\" xmlns:wpi=\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\" xmlns:wps=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\" w:ascii=\"楷体_GB2312\" w:hAnsi=\"楷体_GB2312\"/>\r\n\r\n```\r\n\r\n","author":{"url":"https://github.com/zailaib","@type":"Person","name":"zailaib"},"datePublished":"2024-05-24T08:01:24Z","url":"https://github.com/python-openxml/python-docx/issues/1396"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:68904c55-1962-b7d5-f0a8-61029e490554 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A868:11E9D2:2C4E1B:3B507C:6AFF6595 |
| html-safe-nonce | 1a370f93e73dc20a6a00ee0969e0e61635129de1186ad90433f1fb73124bfbad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODY4OjExRTlEMjoyQzRFMUI6M0I1MDdDOjZBRkY2NTk1IiwidmlzaXRvcl9pZCI6IjcxMzE4MTgzNjEwMTY1MDk4NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3ec5c0400c66d30941ffa7a4bd212c84544b68f7ff7fbbdd788f93ec13298756 |
| hovercard-subject-tag | issue:2314694791 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openxml/python-docx/1396/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5290ef5d1ed3e954e416056038a50194ab4dd249eb04373416cbe2025d868df9/python-openxml/python-docx/issues/1396 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5290ef5d1ed3e954e416056038a50194ab4dd249eb04373416cbe2025d868df9/python-openxml/python-docx/issues/1396 |
| og:image:alt | source import docx from docx import Document print(docx.__version__) doc = Document() p = doc.add_paragraph() run = p.add_run("中文文本 1234 abcd") run.font.name = '楷体_GB2312' print(run.element.xml) pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zailaib |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b58589a1c4eda1e3c8904144a412b88ca4455f63ca2ad3629f2e9f3c3a1d12 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git |
| octolytics-dimension-user_id | 3403760 |
| octolytics-dimension-user_login | python-openxml |
| octolytics-dimension-repository_id | 13592924 |
| octolytics-dimension-repository_nwo | python-openxml/python-docx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13592924 |
| octolytics-dimension-repository_network_root_nwo | python-openxml/python-docx |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8968d6d6acc65d74e4df332d23932dd3fd0502a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width