newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
898 stars 146 forks source link

Option for dynamic text sizing #49

Closed afischer closed 7 years ago

afischer commented 7 years ago

It would be fantastic if there could be a way to allow for dynamic text resizing in responsively exported graphics.

While it might seem like this goes against the spirit of the project, I would argue it still provides functionality over SVGs as the text is selectable and screen-reader friendly.

In terms of implementation, we could use font-size: *vw. It would be an interesting challenge to translate font size to vw units...

Let me know your thoughts :)

mbloch commented 7 years ago

Thanks for this suggestion, @afischer. With "vw" units (as I understand it), font scale would be relative to the width of the viewport, rather than the width of the graphic. This might work for full-screen graphics, but would likely create unwanted effects when the graphic doesn't scale in proportion to the viewport. I'm closing this issue for this reason... feel free to reopen if I'm missing something.