René's URL Explorer Experiment


Title: [Bug]: Right-to-left text that starts with a Latin word is laid out left-to-right · Issue #32511 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: Right-to-left text that starts with a Latin word is laid out left-to-right · Issue #32511 · matplotlib/matplotlib

X Title: [Bug]: Right-to-left text that starts with a Latin word is laid out left-to-right · Issue #32511 · matplotlib/matplotlib

Description: Bug summary Since 3.11, text is shaped with libraqm, but the paragraph direction is always auto-detected from the first strong character. An Urdu (or Arabic, Hebrew) sentence that starts with a Latin word, a product name or a version num...

Open Graph Description: Bug summary Since 3.11, text is shaped with libraqm, but the paragraph direction is always auto-detected from the first strong character. An Urdu (or Arabic, Hebrew) sentence that starts with a Lat...

X Description: Bug summary Since 3.11, text is shaped with libraqm, but the paragraph direction is always auto-detected from the first strong character. An Urdu (or Arabic, Hebrew) sentence that starts with a Lat...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Right-to-left text that starts with a Latin word is laid out left-to-right","articleBody":"### Bug summary\n\nSince 3.11, text is shaped with libraqm, but the paragraph direction is always auto-detected from\nthe first strong character. An Urdu (or Arabic, Hebrew) sentence that starts with a Latin word, a\nproduct name or a version number is therefore laid out left-to-right, so its words and punctuation\ncome out in the wrong order. There is currently no way to set the direction.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\n\ntext = \"Python اور matplotlib میں اردو؟\"  # Urdu sentence that starts with an English word\n\nfig = plt.figure(figsize=(6, 1.6))\nfig.text(0.95, 0.70, text, ha=\"right\", fontsize=18, language=\"ur\")\nfig.text(0.95, 0.25, \"‏\" + text, ha=\"right\", fontsize=18, language=\"ur\")  # RLM prefix\nfig.savefig(\"repro_direction.png\", dpi=100)\n```\n\n### Actual outcome\n\nThe top line is laid out left-to-right: \"Python\" is on the left and the Urdu question mark ؟ ends up\nin the middle of the line instead of at the end of the sentence.\n\n\u003cimg width=\"600\" height=\"160\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a2d12f03-bd28-48e4-b6dc-4c3f899d5a37\" />\n\n### Expected outcome\n\nThe bottom line, where the only change is a U+200F RIGHT-TO-LEFT MARK prefix: the sentence reads\nright-to-left, \"Python\" is on the right where the sentence starts, and ؟ is at the end.\n\n### Additional information\n\n- `FT2Font::layout` in `src/ft2font.cpp` sets the text, face, features and language on the raqm\n  object but never calls `raqm_set_par_direction`, so libraqm uses `RAQM_DIRECTION_DEFAULT`. The\n  libraqm documentation for that function notes that this default \"has problems when a mainly\n  right-to-left paragraph starts with a left-to-right character and vice versa as the detected\n  paragraph direction will be the wrong one\". The same is true on `main`.\n- Passing `language=\"ur\"` does not change the direction.\n- The reverse also happens: a left-to-right label whose first letter is Urdu is laid out\n  right-to-left.\n- Workaround: prefix the string with U+200F (RLM) or U+061C (ALM), or wrap it in U+2067 ... U+2069\n  (RLI ... PDI).\n- This is common in Urdu text: technical terms, names and numbers are often written in Latin script\n  at the start of a sentence.\n- A second image  shows the same sentence in Noto Nastaliq Urdu, as  is, with each direction mark, \n  and an Urdu-first sentence for comparison.\n\n\u003cimg width=\"1210\" height=\"770\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/07925eb1-dcab-4305-b86b-0f3ca04d6be3\" />\n\n- Possible fix: a `direction` text property (\"auto\" by default, \"rtl\", \"ltr\"), passed down to\n  `raqm_set_par_direction` the same way `language` is passed to `raqm_set_language`. I would be\n  happy to work on a PR if that approach sounds acceptable.\n\n### Operating system\n\nWindows 11\n\n### Matplotlib Version\n\n3.11.2\n\n### Matplotlib Backend\n\nAgg\n\n### Python version\n\n3.12.15\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/msarmadsohail","@type":"Person","name":"msarmadsohail"},"datePublished":"2026-10-20T14:48:40Z","url":"https://github.com/matplotlib/matplotlib/issues/32511"}

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:b056551a-00b5-cd29-c8ba-6cdb5ded5a2f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB058:3CBF9:10E5070:1651DF0:6B064EEB
html-safe-nonce5d6e9b5eebc7f52b10e95f72dd30c2a63171a6e320c4bf73f7f18087012daaf0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDU4OjNDQkY5OjEwRTUwNzA6MTY1MURGMDo2QjA2NEVFQiIsInZpc2l0b3JfaWQiOiIxMjcwODQ4NDM2MzMzNTk2Mzk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb3b9290eb35aa52f32314db7c5ae7d2ce27f6b5383742f8c836fa90eacaebfd3
hovercard-subject-tagissue:5943834407
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/32511/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3edd91000fc016d45397358a810b34e8eea77f0a1a7d91486bcc031519b390d7/matplotlib/matplotlib/issues/32511
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3edd91000fc016d45397358a810b34e8eea77f0a1a7d91486bcc031519b390d7/matplotlib/matplotlib/issues/32511
og:image:altBug summary Since 3.11, text is shaped with libraqm, but the paragraph direction is always auto-detected from the first strong character. An Urdu (or Arabic, Hebrew) sentence that starts with a Lat...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemsarmadsohail
hostnamegithub.com
expected-hostnamegithub.com
None772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e
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
releasef1f9a08f7c769a37f1dfc18ad43d463c222a7eea
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/32511#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F32511
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%2Fmatplotlib%2Fmatplotlib%2Fissues%2F32511
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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/32511
Reloadhttps://github.com/matplotlib/matplotlib/issues/32511
Reloadhttps://github.com/matplotlib/matplotlib/issues/32511
matplotlibhttps://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Codehttps://github.com/matplotlib/matplotlib
Issues1k (1k)https://github.com/matplotlib/matplotlib/issues
Pull requests430 (430)https://github.com/matplotlib/matplotlib/pulls
Actionshttps://github.com/matplotlib/matplotlib/actions
Projectshttps://github.com/matplotlib/matplotlib/projects
Wikihttps://github.com/matplotlib/matplotlib/wiki
Security and qualityhttps://github.com/matplotlib/matplotlib/security
Insightshttps://github.com/matplotlib/matplotlib/insights
https://github.com/matplotlib/matplotlib
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32511
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32511
[Bug]: Right-to-left text that starts with a Latin word is laid out left-to-righthttps://github.com/matplotlib/matplotlib/issues/32511#top
first-contributionhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22first-contribution%22
topic: texthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20text%22
https://github.com/msarmadsohail
msarmadsohailhttps://github.com/msarmadsohail
on Oct 20, 2026https://github.com/matplotlib/matplotlib/issues/32511#issue-5943834407
https://private-user-images.githubusercontent.com/91654467/679130273-a2d12f03-bd28-48e4-b6dc-4c3f899d5a37.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTU1NzU4MzEsIm5iZiI6MTc5NTU3NTUzMSwicGF0aCI6Ii85MTY1NDQ2Ny82NzkxMzAyNzMtYTJkMTJmMDMtYmQyOC00OGU0LWI2ZGMtNGMzZjg5OWQ1YTM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzU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HlwZT1pbWFnZSUyRnBuZyJ9.HWv19QpsIbbJcR2fk_wYghenl6Y9On0sRZKc0mRlRfE
github-actionshttps://github.com/apps/github-actions
first-contributionhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22first-contribution%22
on Oct 20, 2026https://github.com/matplotlib/matplotlib/issues/32511#event-33753248759
iccirhttps://github.com/iccir
topic: texthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20text%22
on Oct 20, 2026https://github.com/matplotlib/matplotlib/issues/32511#event-33756050238
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Oct 21, 2026https://github.com/matplotlib/matplotlib/issues/32511#issuecomment-6307963453
https://github.com/iccir
iccirhttps://github.com/iccir
on Oct 21, 2026https://github.com/matplotlib/matplotlib/issues/32511#issuecomment-6321925244
matplotlib.texthttps://matplotlib.org/stable/api/text_api.html
text.language rcparamhttps://matplotlib.org/stable/users/explain/configuration.html#rcparam-text-language
A search for BCP47https://github.com/search?q=repo%3Amatplotlib%2Fmatplotlib+BCP47&type=code
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Oct 21, 2026https://github.com/matplotlib/matplotlib/issues/32511#issuecomment-6327396179
https://github.com/msarmadsohail
msarmadsohailhttps://github.com/msarmadsohail
on Oct 22, 2026https://github.com/matplotlib/matplotlib/issues/32511#issuecomment-6340398269
https://github.com/msarmadsohail
msarmadsohailhttps://github.com/msarmadsohail
on Oct 31, 2026https://github.com/matplotlib/matplotlib/issues/32511#issuecomment-6543163253
Sign up for freehttps://github.com/signup?return_to=https://github.com/matplotlib/matplotlib/issues/32511
Sign in to commenthttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/32511
first-contributionhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22first-contribution%22
topic: texthttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20text%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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.