mumuki / mumuki-laboratory

:microscope: Where students practice and receive automated and human feedback

Home Page:http://mumuki.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shrink custom fields on certificates so they always fit in one line

felipecalvo opened this issue · comments

We had a user whose very long name didn't fit in one line, and so it overlapped with everything else. Our quick solution was to reduce the font size a little bit - from 3rem to 2.7rem - and then re-send him the certificate. This, of course, shrinks everyone's name in the certificate, whether it fit or not.

What would be nice, though, is being able to set a max-font-size and, if it doesn't fit in one line, shrink it as little as possible so it does. This is not possible by CSS alone, it would seem, so it probably requires some JS trickery. I'm not sure how that would affect the PDF generation, either.