Text widgets, crengine: fix wrong vertical positioning (#6093)

Noticable with nastaliq arabic fonts.
bump crengine: fix wrong usage of Harfbuzz y_offset
Same in TextWidget and TextBoxWidget
This commit is contained in:
poire-z
2020-04-25 23:30:49 +02:00
committed by GitHub
parent 7d83a0c967
commit 6a98b2dce9
3 changed files with 3 additions and 3 deletions

2
base

Submodule base updated: d74120a1c3...0494fab12e

View File

@@ -793,7 +793,7 @@ function TextBoxWidget:_renderText(start_row_idx, end_row_idx)
end
self._bb:colorblitFrom(glyph.bb,
xglyph.x0 + glyph.l + xglyph.x_offset,
y - glyph.t + xglyph.y_offset,
y - glyph.t - xglyph.y_offset,
0, 0, glyph.bb:getWidth(), glyph.bb:getHeight(), color)
end
end

View File

@@ -348,7 +348,7 @@ function TextWidget:paintTo(bb, x, y)
bb:colorblitFrom(
glyph.bb,
x + pen_x + glyph.l + xglyph.x_offset,
y + baseline - glyph.t + xglyph.y_offset,
y + baseline - glyph.t - xglyph.y_offset,
0, 0,
glyph.bb:getWidth(), glyph.bb:getHeight(),
self.fgcolor)