Fixed rendering computations for y offset. (#843)

* Fixed rendering computations for y offset.

* Force monospacing if every ascii character has the same integer advance.

* Added in explanatory comment.

* Fixed issues.

* Made lines less long.
This commit is contained in:
Adam
2022-02-15 15:57:07 -05:00
committed by GitHub
parent 05e1968b0b
commit 61e712db12
2 changed files with 19 additions and 9 deletions
+1 -2
View File
@@ -380,9 +380,8 @@ function DocView:draw_line_gutter(idx, x, y, width)
break
end
end
local yoffset = self:get_line_text_y_offset()
x = x + style.padding.x
common.draw_text(self:get_font(), color, idx, "right", x, y + yoffset, width, self:get_line_height())
common.draw_text(self:get_font(), color, idx, "right", x, y, width, self:get_line_height())
end