To add exact fontsize you can use following. Worked for me since in my case predefined ranges (Large, tiny) are not match with the font size required to me.
\fontsize{10}{12}\selectfont This is the text you need to be in 10px
More info: https://tug.org/TUGboat/tb33-3/tb105thurnherr.pdf