Skip to content

Commit

Permalink
Bug fix regarding height of bold font
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Nov 12, 2014
1 parent 2981266 commit fadf1b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/mw.lua
Expand Up @@ -387,7 +387,7 @@ function tooltip (win, -- window name to use
if boldText then
width = math.max (width, WindowTextWidth (win, bold_font_id, boldText, true))
height = height + bold_font_height
else
else
width = math.max (width, WindowTextWidth (win, font_id, v, true))
height = height + font_height
end -- if
Expand Down Expand Up @@ -468,10 +468,11 @@ function tooltip (win, -- window name to use
local boldText = string.match (v, "^%*(.*)%*$")
if boldText then
WindowText (win, bold_font_id, boldText, MARGIN + 1, top, 0, 0, text_colour, true)
top = top + bold_font_height
else
WindowText (win, font_id, v, MARGIN + 1, top, 0, 0, text_colour, true)
top = top + font_height
end -- if
top = top + font_height
end -- for
WindowShow (win, true)
Expand Down

0 comments on commit fadf1b6

Please sign in to comment.