When font family of a private font is retrieved with call to Gdiplus::Font::GetFamily() then later on there is thrown access violation exception when array of cached private font families (filled in by Gdiplus::PrivateFontCollection::GetFamilies()) is deleted in wxGDIPlusRenderer::Unload(). Call to Font::GetFamily() is done in wxGDIPlusContext::GetTextExtent() so this issue can be seen once text extent is retrieved for a private font. Because it looks that calling to Font::GetFamily() for a private font is messing up something in the array of cached private font families so we should avoid calling this method and directly fetch corresponding font family from the cache instead. Reference to the cached font family would be stored in the wxGDIPlusDataFont and it could be fetched from there directly instead of making a call to Font::GetFamily(). Closes #18704.
89 KiB
89 KiB