René's URL Explorer Experiment


Title: Improved output of text in SVG and PDF · Issue #353 · matplotlib/matplotlib · GitHub

Open Graph Title: Improved output of text in SVG and PDF · Issue #353 · matplotlib/matplotlib

X Title: Improved output of text in SVG and PDF · Issue #353 · matplotlib/matplotlib

Description: Original report at SourceForge, opened Mon Dec 15 05:08:09 2008 Text output to SVG is not preserved as pure text, but instead gets output as paths. This makes it very difficult to do adjustments afterwards in e.g. Inkscape. Text should b...

Open Graph Description: Original report at SourceForge, opened Mon Dec 15 05:08:09 2008 Text output to SVG is not preserved as pure text, but instead gets output as paths. This makes it very difficult to do adjustments af...

X Description: Original report at SourceForge, opened Mon Dec 15 05:08:09 2008 Text output to SVG is not preserved as pure text, but instead gets output as paths. This makes it very difficult to do adjustments af...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/353

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improved output of text in SVG and PDF","articleBody":"[Original report at SourceForge, opened Mon Dec 15 05:08:09 2008](https://sourceforge.net/tracker/?func=detail\u0026aid=2430751\u0026group_id=80706\u0026atid=560723)\n\nText output to SVG is not preserved as pure text, but instead gets output as paths. This makes it very difficult to do adjustments afterwards in e.g. Inkscape. Text should be output as text.\n\nIn PDF-files, text is output as text, which is good. These files can be imported into Inkscape and edited, which makes it possible to go around the problem with SVG files. However, kerning is applied to all text, so there is extra spacing between each letter. This makes the text look bad and should, in my mind, be removed.\n\nAs far as possible, text objects should have sensible alignment. E.g. titles, x- and y-labels should be center-aligned, and when using fig.autofmt_xdate(), tick labels should be right-aligned. Currently, all text appears to be left-aligned.\n### SourceForge Comments\n#### On Fri Jun  4 17:59:52 2010, leejjoon wrote:\n\nI believe that this is a feature request rather than a bug in the current stage.\nI'm moving this to a feature requests tracker.\n\n-JJ\n#### On Fri Dec 19 09:18:02 2008, mdboom wrote:\n\nText can be output as text only if the correct fonts are available on the machine on which the SVG is viewed/edited.  Since a common use case of SVG is to share in a browser, embedded paths is often the best thing.  The SVG font standard would be a much better way to solve this, but as of a year ago, last time I looked, none of Mozilla, Inkscape, or cairo-rsvg had SVG font support.  Progress has been made in the intervening time, but until a _release_ version of software supports it, it's not going to be very practical or useful.  It's a bit of a chicken-and-egg problem.  As John pointed out, though, the svg.embed_char_paths option allows the user to choose, as long as the viewer/editor has access to the same fonts as matplotlib.\n\nAs for your second point about text kerning in PDF files -- I suspect this is an issue in the PDF-to-SVG conversion, as the kerning looks fine in the original PDF, and is in fact required for the text to look correct, since we embed only a subset of the font.  I'm trying to reproduce this, but my Inkscape (0.46) doesn't seem to have PDF import as an option (though it may just be a missing dependency).  Can you file a separate bug for this and attach .pdf and .svg (converted from .pdf) that exhibits this problem?\n\nLastly, as for alignment, I think that's a reasonable goal, but is a reasonably large task.  It will require refactoring all of the backends, which are currently completely ignorant of text alignment.  Unfortunately, in the general case including math text, this is probably impossible -- we may only be able to support this for regular text.\n\nAs you can see, the emphasis has always been on output for display rather than editing (the latter is simply a lot harder to get right, as with any tool that generates code).\n#### On Thu Dec 18 05:19:10 2008, malmjako wrote:\n\nThanks! Setting 'svg.embed_char_paths' False gave me plain text in the SVG. However, the text is not correctly aligned. Although the texts are qualitatively in the right place, center- and right-aligned texts are somewhat off, as it seems because the width is not correctly calculated for plain text output.\n\nSVG text objects need to have the style attribute(s) 'text-anchor' and possibly 'text-align' correctly set (although changing the latter did not have any effect on how Inkscape rendered text objects), and the reference point set to the left, center or right point of the object, i.e. the position that the text should be aligned to. No width calculation would then be necessary, resulting in correctly aligned text when using plain text output. It would also make editing the text easier, because text would flow correctly without having to realign the text object.\n\nI have matplotlib 0.98.3 from the Enthought Python Distribution for Windows. Please try with plain text output from 0.98.5 as well!\nFile Added: alignment_test_0.98.3_plaintext.svg\n#### On Wed Dec 17 06:15:11 2008, jdh2358 wrote:\n\nWhen I run the alignement_test, included below, all text appears to be aligned properly in svg.  I am running 0.98.5 (what version are you running?)\n\nYou can control whether matplotlib embeds the character paths or the plain text using the rc paramter 'svg.embed_char_paths'.  See http://matplotlib.sourceforge.net/users/customizing.html for info on how to set the rc paramters.\n### SourceForge History\n- On Fri Jun  4 17:59:52 2010, by leejjoon: data_type: 560723\n- On Fri Jun  4 17:59:52 2010, by leejjoon: resolution_id: 100\n- On Thu Dec 18 16:30:55 2008, by jdh2358: assigned_to: 395152\n- On Thu Dec 18 05:19:10 2008, by malmjako: File Added: 305825: alignment_test_0.98.3_plaintext.svg\n- On Wed Dec 17 06:16:01 2008, by jdh2358: File Added: 305696: alignment_test.svg\n- On Wed Dec 17 06:15:50 2008, by jdh2358: File Added: 305695: alignment_test.py\n- On Wed Dec 17 06:15:11 2008, by jdh2358: assigned_to: 100\n","author":{"url":"https://github.com/ddale","@type":"Person","name":"ddale"},"datePublished":"2011-06-20T21:19:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/353/matplotlib/issues/353"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bc5e21f2-cd6e-1e94-3649-1f499cd548ab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEAC0:1EFAFB:54D953:72CEFE:6A529A62
html-safe-nonce8a4a2dc0713b5fac5e4f4ee9aa4af42d173042b86f86164c78d462bcfac284ba
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUMwOjFFRkFGQjo1NEQ5NTM6NzJDRUZFOjZBNTI5QTYyIiwidmlzaXRvcl9pZCI6IjcwNTcwNjY1NTU0NTczMTMzNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd27cacec5d4aefbe8b90a8b7f6558f33d69fb3f2070f54570b5060a68fedf24c
hovercard-subject-tagissue:1088095
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/matplotlib/matplotlib/353/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f961b92ed73a1ac3f11d5a5c1f6984c815c05a47cdfba3a42192d295c9a7628b/matplotlib/matplotlib/issues/353
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f961b92ed73a1ac3f11d5a5c1f6984c815c05a47cdfba3a42192d295c9a7628b/matplotlib/matplotlib/issues/353
og:image:altOriginal report at SourceForge, opened Mon Dec 15 05:08:09 2008 Text output to SVG is not preserved as pure text, but instead gets output as paths. This makes it very difficult to do adjustments af...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameddale
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/353#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F353
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F353
Sign up https://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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/353
Reloadhttps://github.com/matplotlib/matplotlib/issues/353
Reloadhttps://github.com/matplotlib/matplotlib/issues/353
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/353
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/353
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Improved output of text in SVG and PDFhttps://github.com/matplotlib/matplotlib/issues/353#top
New featurehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22New%20feature%22
status: confirmed bughttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20confirmed%20bug%22
https://github.com/ddale
ddalehttps://github.com/ddale
on Jun 20, 2011https://github.com/matplotlib/matplotlib/issues/353#issue-1088095
Original report at SourceForge, opened Mon Dec 15 05:08:09 2008https://sourceforge.net/tracker/?func=detail&aid=2430751&group_id=80706&atid=560723
http://matplotlib.sourceforge.net/users/customizing.htmlhttp://matplotlib.sourceforge.net/users/customizing.html
New featurehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22New%20feature%22
status: confirmed bughttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20confirmed%20bug%22
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.