QML and font sizes when designing for multiple screen sizes (Android)

I'm having my first go at developing an App for android. What I do is design each button, bar, text so that the width and height is a percentage of the main window width and height. This way, I make sure that the proportions will look right in any given screen. My problem is the font. My question is: How can I compute the font size for, say, my buttons so that text won't be too small or too large in any given screen?

This is what I've tried.

My best result was to compute the font size for each button like this:

Now, this works perfectly (it gives a warning, but I allready have an idea on how to fix it), but in a real life application I'm afraid of have like an OK and CANCEL button and they will be shown with different font sizes.