question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Users who make PNG exports at very high resolutions (e.g. for publication) run in to the issue that text font sizes are fixed and do not scale, leading to very tiny titles, labels, etc in the larger image. AFAIK units like rem, etc do not work on Canvas, but this should be verified. If not, it would be helpful to introduce our own unit that we manually scale according to canvas height.

Tangentially related to https://github.com/bokeh/bokeh/issues/6840

cc @bokeh/dev for thoughts, input.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
bryevdvcommented, Jul 2, 2020

It’s also not entirely clear to me that this approach would actually work even for one plot, at least without some changes. Looking just now the current output of canvas2svg specifies actual width and height attributes and CSS styles in the CVG tag itself. This presently makes scaling somewhat painful. It would probably be better or the output to specify a view box instead:

viewBox="0 0 900 400"

Changing that allows for actual responsive scaling of the SVGand I expect this is actually what people would like with an SVG output (both images below span my entire desktop):

Screen Shot 2020-07-02 at 3 46 00 PM Screen Shot 2020-07-02 at 3 46 19 PM

(Perhaps a separate issue should be opened for view box)

Of course, people want this not only for exports but simply for real bokeh plots in responsive scenarios in browsers that can range widely in size, and none of this would help for that.

1reaction
birdsarahcommented, Nov 13, 2019

This would be a phenomenal feature. I had to make a special theme to make my publication plots look right.

That said, it wasn’t the biggest hurdle I faced in making publication plots and we could publish a theme that helps with this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - Font scaling based on width of container - Stack Overflow
I tried using em , but this doesn't scale either. My reasoning is that things like my menu become squished when you resize,...
Read more >
Text scaling - Android Accessibility Help - Google Support
To support different screen sizes, screen orientations, pixel densities, and font sizes, Accessibility Scanner looks for places where text doesn't scale.
Read more >
On Scalable Text - uiAccess
In order to provide scalable text, make textual information text (rather than images), and use relative text sizes (rather than absolute). Scalable text...
Read more >
How To Create a Responsive Text - W3Schools
Learn how to create responsive typography with CSS. Hello World. Resize the browser window to see how the font size scales. Try it...
Read more >
Text scaling - Windows apps | Microsoft Learn
Users can adjust text scale with the Make text bigger slider on the Settings -> Ease of Access -> Vision/Display screen. Screenshot of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found