imsky / holder

:city_sunrise: Client-side image placeholders.
http://holderjs.com
MIT License
5.84k stars 592 forks source link

Could not set size lesser than certain value #223

Open pincher2012 opened 5 years ago

pincher2012 commented 5 years ago

https://github.com/imsky/holder/blob/5d03b972f0082c6c640f8e9223ca897ebc24dd50/src/lib/index.js#L844

This code use image dimensions and App.defaults.scale which is not configurable for fontSize computing. https://github.com/imsky/holder/blob/5d03b972f0082c6c640f8e9223ca897ebc24dd50/src/lib/index.js#L660

Hence font size could not be lesser then some computed value. It would be great to set any font size.

imsky commented 5 years ago

yes Holder was designed to render text in a "foolproof" way, so that tiny text would be impossible

i'll think about this, seems reasonable to allow more control. probably a v3 feature