Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[simple-ruby] Text in figure 1 may be cut off #13

Closed
bert-github opened this issue Apr 2, 2020 · 4 comments
Closed

[simple-ruby] Text in figure 1 may be cut off #13

bert-github opened this issue Apr 2, 2020 · 4 comments

Comments

@bert-github
Copy link

https://w3c.github.io/jlreq/docs/simple-ruby/#ruby-types

Figure 1 is an SVG image with some text in it. The text has a font size of 8 px. The image is scaled so the resulting text actually looks bigger. But if a user has set a minimum font size in Firefox of 11 px (for example), it is that original 8 that gets replaced by 11. The result is that the text after scaling is too high and too wide for the image and the top and some letters on the right are cut off.

Some users may have set quite a large minimum font size, but maybe a reasonable compromise is to set the font in the image to 16 px and then scale the image down rather than up.

@xfq
Copy link
Member

xfq commented Apr 3, 2020

Agreed.

(Another option is converting the text to outlines, but it might have accessibility implications and makes the SVG file harder to edit.)

@frivoal
Copy link

frivoal commented Apr 3, 2020

Having the minimum font size setting affect text in an SVG seems particularly prone to breakage, but I guess we're not here to discuss features of Firefox :)

maybe a reasonable compromise is to set the font in the image to 16 px and then scale the image down rather than up.

Sounds like this would work. I probably could figure out how to do this, but I'm not really an SVG person. Do you want to send a pull request?

@r12a r12a transferred this issue from w3c/jlreq Apr 3, 2020
@bert-github
Copy link
Author

Sure. Pull request sent:
#15

@himorin
Copy link
Contributor

himorin commented May 29, 2020

closed with all image files updated

@himorin himorin closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants