git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73644
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int lineSpacing = 0;
// Let's assume line spacing of 10 is normal, 15 is 1.5, 20 is 2, etc.
int lineSpacing = 0;
// Let's assume line spacing of 10 is normal, 15 is 1.5, 20 is 2, etc.
- if (attr.HasLineSpacing() && attr.GetLineSpacing() > 0 && attr.GetFont().IsOk())
+ if (attr.HasLineSpacing() && attr.GetLineSpacing() > 0 && attr.HasFont())
- wxCheckSetFont(dc, attr.GetFont());
- lineSpacing = (int) (double(dc.GetCharHeight()) * (double(attr.GetLineSpacing())/10.0 - 1.0));
+ wxFont font(buffer->GetFontTable().FindFont(attr));
+ if (font.IsOk())
+ {
+ wxCheckSetFont(dc, font);
+ lineSpacing = (int) (double(dc.GetCharHeight()) * (double(attr.GetLineSpacing())/10.0 - 1.0));
+ }
}
// Start position for each line relative to the paragraph
}
// Start position for each line relative to the paragraph