When I get the list of fonts using wxFontEnumerator::GetFacenames(), it contains a font named:
"CCMeanwhile-Regular"
If I now create a font like so:
wxFont testFont(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, "CCMeanwhile Regular");
(with a space instead of a hyphen in the face name), then wxFontEnumerator::IsValidFacename(testFont.GetFaceName()) returns false, as expected.
However, if I now pass this font to a DC using DC::SetFont(testFont), the DC uses the "CCMeanwhile-Regular" font to draw text.
The documentation for wxFont states:
"If the desired font does not exist, the closest match will be chosen."
Is there a way to know in advance if a DC will render text using the default font or not, when given a particular font name string? Basically, the same as wxFontEnumerator::IsValidFacename, but taking into account the fuzzy matching?
Thank you for your continued work on this great library.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()