René's URL Explorer Experiment


Title: [BUG]: Text extents are not recomputed after web font loading · Issue #8089 · plotly/plotly.js · GitHub

Open Graph Title: [BUG]: Text extents are not recomputed after web font loading · Issue #8089 · plotly/plotly.js

X Title: [BUG]: Text extents are not recomputed after web font loading · Issue #8089 · plotly/plotly.js

Description: Description When using custom web fonts loaded via @font-face or external stylesheets, Plotly computes text extents before the configured font is available and therefore uses fallback font metrics. Once the web font has loaded, the SVG t...

Open Graph Description: Description When using custom web fonts loaded via @font-face or external stylesheets, Plotly computes text extents before the configured font is available and therefore uses fallback font metrics....

X Description: Description When using custom web fonts loaded via @font-face or external stylesheets, Plotly computes text extents before the configured font is available and therefore uses fallback font metrics....

Opengraph URL: https://github.com/plotly/plotly.js/issues/8089

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: Text extents are not recomputed after web font loading","articleBody":"### Description\n\nWhen using custom web fonts loaded via @font-face or external stylesheets, Plotly computes text extents before the configured font is available and therefore uses fallback font metrics.\n\nOnce the web font has loaded, the SVG text elements correctly update to the configured font-family, but the previously computed text extents are not recomputed.\n\nAs a result, text may become clipped or incorrectly positioned when the web font has significantly different metrics from the fallback font, which is particularly noticeable with monospace fonts.\n\nThe issue only occurs on the first page load. A subsequent refresh uses the already-loaded web font, and the text extents are calculated correctly.\n\nExpected behavior: Text extents should either be computed after the configured font has loaded or recomputed once the font becomes available.\n\n### Screenshots/Video\n\nOutput of example below:\n\n\u003cimg width=\"1905\" height=\"917\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8e538651-e363-4007-b2e0-000543000b43\" />\n\n### Steps to reproduce\n\nMinimal example using a slightly modified version of the [bar chart example](https://plotly.com/python/bar-charts/#bar-charts-with-long-format-data)\n\n`Plotly version: v6.9.0`\n\n```py\nimport plotly.express as px\n\nlong_df = px.data.medals_long()\n\nfig = px.bar(long_df, x=\"nation\", y=\"count\", color=\"medal\", title=\"Long-Form Input\")\n\nfig.update_layout(\n    font=dict(\n        family=\"JetBrains Mono\",\n    ),\n    legend=dict(\n        borderwidth=1\n    )\n)\nfig.add_annotation(\n    x=1.05,\n    y=0.0,\n    xref=\"paper\",\n    yref=\"paper\",\n    xanchor=\"left\",\n    yanchor=\"bottom\",\n    text=\"Source: Coyote | \\u00a9 ACME\",\n    textangle=-90,\n    showarrow=False,\n    bgcolor=\"rgba(0,0,0,0.2)\",\n)\n\nfig.write_html(\"plotly_bar_jetbrains_mono.html\", include_plotlyjs=\"cdn\")\n\n# Inject the following stylesheet into the head section of the html\n# \u003clink rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@fontsource/jetbrains-mono@5.0.20/index.css\">\n```\n\n### Notes\n\nTested with:\n`Firefox 152.0.5`\n`Edge 150.0.4078.65`\n`Chrome 150.0.7871.115`","author":{"url":"https://github.com/now-daniel-beiter","@type":"Person","name":"now-daniel-beiter"},"datePublished":"2026-07-11T21:23:20Z","url":"https://github.com/plotly/plotly.js/issues/8089"}

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:e9c193a5-a832-3aa9-9a87-80a458cc17d7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBBE4:22DB35:2F49F46:3C5B029:6B01B4EE
html-safe-noncec6495dad624a33def8db5a3ba3df7887fdca2f153b47ac41a7d1de7a9082c03c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkU0OjIyREIzNToyRjQ5RjQ2OjNDNUIwMjk6NkIwMUI0RUUiLCJ2aXNpdG9yX2lkIjoiMjE1MDY2NDA5NDU1Mjc5ODQ0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaced108bafb5662f9c548e52e0fe665c3c5b34061ae53c34534228a8bb3d72a9ac
hovercard-subject-tagissue:5622797782
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/plotly/plotly.js/8089/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d4283da4d7d01c241a536dbea13a5920e7389fa089c37c613964fa1fda1e2d8d/plotly/plotly.js/issues/8089
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d4283da4d7d01c241a536dbea13a5920e7389fa089c37c613964fa1fda1e2d8d/plotly/plotly.js/issues/8089
og:image:altDescription When using custom web fonts loaded via @font-face or external stylesheets, Plotly computes text extents before the configured font is available and therefore uses fallback font metrics....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenow-daniel-beiter
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id45646037
octolytics-dimension-repository_nwoplotly/plotly.js
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id45646037
octolytics-dimension-repository_network_root_nwoplotly/plotly.js
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/plotly/plotly.js/issues/8089#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.js%2Fissues%2F8089
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%2Fplotly%2Fplotly.js%2Fissues%2F8089
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=plotly%2Fplotly.js
Reloadhttps://github.com/plotly/plotly.js/issues/8089
Reloadhttps://github.com/plotly/plotly.js/issues/8089
Reloadhttps://github.com/plotly/plotly.js/issues/8089
plotlyhttps://github.com/plotly
plotly.jshttps://github.com/plotly/plotly.js
Codehttps://github.com/plotly/plotly.js
Issues726 (726)https://github.com/plotly/plotly.js/issues
Pull requests84 (84)https://github.com/plotly/plotly.js/pulls
Actionshttps://github.com/plotly/plotly.js/actions
Security and qualityhttps://github.com/plotly/plotly.js/security
Insightshttps://github.com/plotly/plotly.js/insights
https://github.com/plotly/plotly.js
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.js/issues/8089
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.js/issues/8089
#8094https://github.com/plotly/plotly.js/pull/8094
[BUG]: Text extents are not recomputed after web font loadinghttps://github.com/plotly/plotly.js/issues/8089#top
#8094https://github.com/plotly/plotly.js/pull/8094
https://github.com/camdecoster
P2considered for next cyclehttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22P2%22
bugsomething brokenhttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22bug%22
size: 5https://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22size%3A%205%22
https://github.com/now-daniel-beiter
now-daniel-beiterhttps://github.com/now-daniel-beiter
on Jul 11, 2026https://github.com/plotly/plotly.js/issues/8089#issue-5622797782
@font-facehttps://github.com/font-face
https://private-user-images.githubusercontent.com/204225306/620487512-8e538651-e363-4007-b2e0-000543000b43.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUyNzQyNjYsIm5iZiI6MTc5NTI3Mzk2NiwicGF0aCI6Ii8yMDQyMjUzMDYvNjIwNDg3NTEyLThlNTM4NjUxLWUzNjMtNDAwNy1iMmUwLTAwMDU0MzAwMGI0My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyMVQxNTEyNDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZGQ3OGFiMWFkYWI3YjUzZmVkMjUwYjQ0ODRhYjZlNmE1MDFhNzU4MWNlMmZmMWY1Y2RhOGRiMTAyNDg1MDc1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.H0zZ4_-GO7RoQmIdy5XA8p8eKS2FroefXerQWKwqDsI
bar chart examplehttps://plotly.com/python/bar-charts/#bar-charts-with-long-format-data
now-daniel-beiterhttps://github.com/now-daniel-beiter
bugsomething brokenhttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22bug%22
on Jul 11, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037224501
exalate-issue-synchttps://github.com/apps/exalate-issue-sync
bugsomething brokenhttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22bug%22
on Jul 12, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037224634
camdecosterhttps://github.com/camdecoster
emilyklhttps://github.com/emilykl
on Jul 22, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037224675
robertclaushttps://github.com/robertclaus
bugsomething brokenhttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22bug%22
on Jul 27, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037224765
https://github.com/robertclaus
robertclaushttps://github.com/robertclaus
on Jul 27, 2026https://github.com/plotly/plotly.js/issues/8089#issuecomment-5880830742
@emilyklhttps://github.com/emilykl
https://github.com/emilykl
emilyklhttps://github.com/emilykl
on Jul 30, 2026https://github.com/plotly/plotly.js/issues/8089#issuecomment-5880830813
@now-daniel-beiterhttps://github.com/now-daniel-beiter
Here's a CodePen reproducing the issue in JavaScript.https://codepen.io/emilykl-code/pen/PwWxEgv
emilyklhttps://github.com/emilykl
P2considered for next cyclehttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22P2%22
size: 5https://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22size%3A%205%22
on Jul 30, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037224989
https://github.com/now-daniel-beiter
now-daniel-beiterhttps://github.com/now-daniel-beiter
on Aug 5, 2026https://github.com/plotly/plotly.js/issues/8089#issuecomment-5880830857
@emilyklhttps://github.com/emilykl
https://github.com/camdecoster
camdecosterhttps://github.com/camdecoster
on Aug 5, 2026https://github.com/plotly/plotly.js/issues/8089#issuecomment-5880830903
https://github.com/camdecoster
camdecosterhttps://github.com/camdecoster
on Sep 28, 2026https://github.com/plotly/plotly.js/issues/8089#issuecomment-5880830941
camdecosterhttps://github.com/camdecoster
plotly/plotly.pyhttps://github.com/plotly/plotly.py
on Sep 28, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037267557
camdecosterhttps://github.com/camdecoster
camdecosterhttps://github.com/camdecoster
emilyklhttps://github.com/emilykl
on Sep 28, 2026https://github.com/plotly/plotly.js/issues/8089#event-32037308150
camdecosterhttps://github.com/camdecoster
completedhttps://github.com/plotly/plotly.js/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8094https://github.com/plotly/plotly.js/pull/8094
on Oct 2, 2026https://github.com/plotly/plotly.js/issues/8089#event-32331607199
Sign up for freehttps://github.com/signup?return_to=https://github.com/plotly/plotly.js/issues/8089
Sign in to commenthttps://github.com/login?return_to=https://github.com/plotly/plotly.js/issues/8089
camdecosterhttps://github.com/camdecoster
P2considered for next cyclehttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22P2%22
bugsomething brokenhttps://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22bug%22
size: 5https://github.com/plotly/plotly.js/issues?q=state%3Aopen%20label%3A%22size%3A%205%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.