From 3db261d312773f0882c38e7801963b438afb7f80 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Wed, 16 Oct 2024 13:32:04 +0200 Subject: [PATCH] revert to old sizing --- src/basic_recipes/text.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/basic_recipes/text.jl b/src/basic_recipes/text.jl index 52df1cc6390..2c38861e438 100644 --- a/src/basic_recipes/text.jl +++ b/src/basic_recipes/text.jl @@ -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), @@ -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), @@ -624,10 +624,10 @@ 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), @@ -635,10 +635,10 @@ function new_glyphstate(gs::GlyphState, rt::RichText, ::Val{:subsup_sub}, fonts) 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),