Friday, September 22, 2017

Is there any way to get the monospaced digit version of the system font using QFont in Qt 5 on macOS?

Leave a Comment

I am using Qt 5.9.1 on macOS 10.12 and I would like to use the system font (San Francisco) with the monospaced digit option that is provided by the monospacedDigitSystemFontOfSize:weight: function in NSFont. Right now, I setting the font as follows:

widget->setFont(QFont(".SF NS Display", 11)) 

The standard San Francisco font has proportional digits, so it makes animating the digits look jittery and makes it difficult to compare a column of numeric data. The NSFont API allows you to use the San Francisco proportional font, but select a version of it that has monospaced digits. Can this functionality be achieved using Qt 5?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment