3 ms·
I was working on Display an Event Title, across devices. Sine the title can very dramatically, from just a word, to as many as 10+ words. Its hard to size this
by dukeofdoom 6y ago
I was working on Display an Event Title, across devices. Sine the title can very dramatically, from just a word, to as many as 10+ words. Its hard to size this properly, so that it displays on phone and computer screens. Not really sure which approach I should have taken, but I ended up using if statements to change font size based on word count. Wish there was some way of setting the font size so that it fills to the end of the screen. But its no larger so that title is longer than two lines. Its really easy to spot a title when its too big or too small, so that its not aesthetically pleasing. But don't really know how to do that in code. Seems like a font size that is tied to the line length might help.
- perardi 6y agoPerhaps using… http://fittextjs.com http://fittextjs.com
- dukeofdoom 6y agoThanks, looks great