wxHtmlWinParser::SetFonts now refreshes fonts cache

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 1999-11-28 18:26:45 +00:00
parent ec74539c12
commit c9f56e70f4

View File

@ -81,11 +81,24 @@ void wxHtmlWinParser::AddModule(wxHtmlTagsModule *module)
void wxHtmlWinParser::SetFonts(wxString normal_face, int normal_italic_mode, wxString fixed_face, int fixed_italic_mode, const int *sizes)
{
for (int i = 0; i < 7; i++) m_FontsSizes[i] = sizes[i];
int i, j, k, l, m;
for (i = 0; i < 7; i++) m_FontsSizes[i] = sizes[i];
m_FontFaceFixed = fixed_face;
m_FontFaceNormal = normal_face;
m_ItalicModeFixed = fixed_italic_mode;
m_ItalicModeNormal = normal_italic_mode;
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < 2; k++)
for (l = 0; l < 2; l++)
for (m = 0; m < 7; m++) {
if (m_FontsTable[i][j][k][l][m] != NULL) {
delete m_FontsTable[i][j][k][l][m];
m_FontsTable[i][j][k][l][m] = NULL;
}
}
}
@ -242,7 +255,6 @@ wxFont* wxHtmlWinParser::CreateCurrentFont()
if (m_FontsTable[fb][fi][fu][ff][fs] == NULL) {
m_FontsTable[fb][fi][fu][ff][fs] =
//wxTheFontList -> FindOrCreateFont(
new wxFont(
m_FontsSizes[fs],
ff ? wxMODERN : wxSWISS,