For example, to select the font we provided above (Judou Mono FCM), if we use QFontDialog::getFont() and select the same font but different style name, the output of the following code would be: // Button to open the font dialog QPushButton *fontButton = new QPushButton("Select Font", &window); QObject::connect(fontButton, &QPushButton::clicked, [&]() { bool ok; // Open the font dialog QFont font = QFontDialog::getFont(&ok, label->font(), &window, "Pick a font"); if (ok) { // If the user clicks OK,...
For example, to select the font we provided above (Judou Mono FCM), if we use QFontDialog::getFont() and select the same font but different style name, the output of the following code would be: // Button to open the font dialog QPushButton *fontButton = new QPushButton("Select Font", &window); QObject::connect(fontButton, &QPushButton::clicked, [&]() { bool ok; // Open the font dialog QFont font = QFontDialog::getFont(&ok, label->font(), &window, "Pick a font"); if (ok) { // If the user clicks OK,...
"Extended" here appears to be equivalent to setting the font stretch parameter to greater than the default SC_STRETCH_NORMAL=5 like SC_STRETCH_EXPANDED=7. Well, style name works like a "preset", developers does not know the actual stretch number, different font might offer different stretch value using the same style name, or even using a different style name. Actually, we cannot even know the style name is for the stretch font property since the name itself can be anything... it is less likely that...
Some additional context: If you've downloaded the provided font (JudouMonoFCM), inside the zip file you can see a list of ttf files which is exactly the same font but with different style names. Other fonts also do this as well.
See the attached screenshot. Beside "Extended", there are "Light Extended" and "Bold Extended" as well. I would also suggest you try it out too simply with a QFontDialog. I'm not a font expert, to my understanding, a font style seems like a font properties preset.
Maybe I still haven't understand the question itself? The end user might choose to use the "Extended" style. The application simply offered a QFontDialog to allow user to select the preferred font, font size, style, etc.
Also see this attachment for a screenshot of QFontDialog, the middle list view is font name selection area which shows all available style names. For the mentioned Judou font, you can find it here: https://github.com/JudouEco/JudouMono/releases/tag/v2.0.0
It is "Judou Mono FCM Extended", "Judou Mono FCM" is its font family, "Extended" is its style name. Another example is "Source Code Pro Semibold" which "Source Code Pro" is its font family name and "Semibold" is its style name. The comma here as a splitter to allow we know whch part is font family name and which part is style name.