Scalable Text
See original GitHub issueUsers 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:
- Created 4 years ago
- Reactions:2
- Comments:9 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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: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):
(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.
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.