Skip to content

Commit

Permalink
revert to old sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Oct 16, 2024
1 parent ca0d40b commit 3db261d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/basic_recipes/text.jl
Original file line number Diff line number Diff line change
Expand Up @@ -585,11 +585,11 @@ _get_offset(attributes, default)::Vec2f = haskey(attributes, :offset) ? Vec2f(at

function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:sup}, fonts)
att = rt.attributes
fontsize = _get_fontsize(att, gs.size * 0.70)
fontsize = _get_fontsize(att, gs.size * 0.66)
offset = _get_offset(att, Vec2f(0)) .* fontsize
GlyphState(
gs.x + offset[1],
gs.baseline + 0.45 * gs.size[2] + offset[2],
gs.baseline + 0.4 * gs.size[2] + offset[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand All @@ -611,11 +611,11 @@ end

function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:sub}, fonts)
att = rt.attributes
fontsize = _get_fontsize(att, gs.size * 0.70)
fontsize = _get_fontsize(att, gs.size * 0.66)
offset = _get_offset(att, Vec2f(0)) .* fontsize
GlyphState(
gs.x + offset[1],
gs.baseline - 0.3 * gs.size[2] + offset[2],
gs.baseline - 0.25 * gs.size[2] + offset[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand All @@ -624,21 +624,21 @@ end

function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:subsup_sub}, fonts)
att = rt.attributes
fontsize = _get_fontsize(att, gs.size * 0.70)
fontsize = _get_fontsize(att, gs.size * 0.66)
GlyphState(
gs.x,
gs.baseline - 0.3 * gs.size[2],
gs.baseline - 0.25 * gs.size[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
)
end
function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:subsup_sup}, fonts)
att = rt.attributes
fontsize = _get_fontsize(att, gs.size * 0.70)
fontsize = _get_fontsize(att, gs.size * 0.66)
GlyphState(
gs.x,
gs.baseline + 0.45 * gs.size[2],
gs.baseline + 0.4 * gs.size[2],
fontsize,
_get_font(att, gs.font, fonts),
_get_color(att, gs.color),
Expand Down

0 comments on commit 3db261d

Please sign in to comment.