Skip to content

Commit

Permalink
Merge pull request #91 from Kolaru/accents
Browse files Browse the repository at this point in the history
Correct height of accents
  • Loading branch information
Kolaru authored Nov 20, 2022
2 parents ae2be8a + f98d8d3 commit 81c6dad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/layout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function tex_layout(expr, state)
elseif head == :combining_accent
accent, core = tex_layout.(args, state)

# Same space between the top of core and the accent than
# between the top of a 'x' and the accent
y = topinkbound(core) - xheight(font_family)

if core.slanted
Expand All @@ -44,7 +46,7 @@ function tex_layout(expr, state)
[core, accent],
Point2f[
(0, 0),
(x + hmid(core) - hmid(accent), 0)
(x + hmid(core) - hmid(accent), y)
],
[1, 1]
)
Expand Down

0 comments on commit 81c6dad

Please sign in to comment.