alexpana / wxWidgets

Read-only mirror of the wxWidgets SVN repo (automatically updated). Report issues here: http://trac.wxwidgets.org/
http://www.wxwidgets.org/
3 stars 0 forks source link

Non TrueType font problem with DirectD2D #21

Open turkin60 opened 9 years ago

turkin60 commented 9 years ago

wxGraphicsD2D doesn't support non TrueType fonts. But if such font is for some reason used, this situation isn't handled in a suitable way. As a result the application crashes.

File graphicsd2d.cpp, line 2102:

    hr = gdiInterop->CreateFontFromLOGFONT(&logfont, &m_font);
                                                                                           ^^^^^^^^^^
    wxCOMPtr<IDWriteFontFamily> fontFamily;
    m_font->GetFontFamily(&fontFamily);
    ^^^^^^^^^

If the font isn't supported m_font = 0, but isn't any checking for that.

alexpana commented 9 years ago

Thank you for your report, I'll have a look at it as soon as possible.