int lineSpacing = 0;
// Let's assume line spacing of 10 is normal, 15 is 1.5, 20 is 2, etc.
- if (attr.GetLineSpacing() != 10 && GetBuffer())
+ if (attr.HasLineSpacing() && attr.GetLineSpacing() > 0 && attr.GetFont().Ok())
{
- wxFont font(GetBuffer()->GetFontTable().FindFont(attr));
- wxCheckSetFont(dc, font);
- lineSpacing = (ConvertTenthsMMToPixels(dc, dc.GetCharHeight()) * attr.GetLineSpacing())/10;
+ wxCheckSetFont(dc, attr.GetFont());
+ lineSpacing = (int) (double(dc.GetCharHeight()) * (double(attr.GetLineSpacing())/10.0 - 1.0));
}
// Available space for text on each line differs.