Yes, and that's exactly the problem with this approach. There's no accounting for the different metrics of the fonts.
Font size and font family should ideally always be set together. If you're setting a font-size, then you should force a font-family, and vice versa. Otherwise, you should set neither and let the user agent decide. This ensures that you would never get a broken combination that's uncomfortable or unusable.
It's similar to the idea that whenever you're setting a foreground color, you should always set the background color as well.
Font size and font family should ideally always be set together. If you're setting a font-size, then you should force a font-family, and vice versa. Otherwise, you should set neither and let the user agent decide. This ensures that you would never get a broken combination that's uncomfortable or unusable.
It's similar to the idea that whenever you're setting a foreground color, you should always set the background color as well.