Skip to content

Commit

Permalink
tweak positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Oct 16, 2024
1 parent 7181530 commit 70f4ab7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/basic_recipes/text.jl
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:sup}, fonts)
offset = _get_offset(att, Vec2f(0)) .* fontsize
GlyphState(
gs.x + offset[1],
gs.baseline + 0.5 * gs.size[2] + offset[2],
gs.baseline + 0.45 * gs.size[2] + offset[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand All @@ -615,7 +615,7 @@ function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:sub}, fonts)
offset = _get_offset(att, Vec2f(0)) .* fontsize
GlyphState(
gs.x + offset[1],
gs.baseline - 0.25 * gs.size[2] + offset[2],
gs.baseline - 0.3 * gs.size[2] + offset[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand All @@ -627,7 +627,7 @@ function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:subsup_sub}, fonts)
fontsize = _get_fontsize(att, gs.size * 0.70)
GlyphState(
gs.x,
gs.baseline - 0.25 * gs.size[2],
gs.baseline - 0.3 * gs.size[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand All @@ -638,7 +638,7 @@ function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:subsup_sup}, fonts)
fontsize = _get_fontsize(att, gs.size * 0.70)
GlyphState(
gs.x,
gs.baseline + 0.5 * gs.size[2],
gs.baseline + 0.45 * gs.size[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand Down

0 comments on commit 70f4ab7

Please sign in to comment.