Repository navigation
Style\Font : Raise a superscript by 30% and not by 300% - #998
Merged
Progi1984 merged 2 commits intoSep 8, 2026
Merged
Conversation
3 of 4 tasks
The baseline attribute is written in thousandths of a percent, so BASELINE_SUPERSCRIPT of 300000 asks for a 300% raise and puts the character on a line of its own. 0.9.0 wrote 30000 and -25000 before the constants replaced the hard-coded values, and LibreOffice uses those same two numbers when it maps w:vertAlign to baseline.
dkulyk
force-pushed
the
fix/baseline-superscript-scale
branch
from
September 8, 2026 08:01
a9dfba9 to
6730d19
Compare
Progi1984
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Font::BASELINE_SUPERSCRIPTis300000andBASELINE_SUBSCRIPTis-250000. Thebaselineattribute is written in thousandths of a percent, so those ask for a 300% raise and a 250% drop and
the character lands on a line of its own.
30000and-25000are what 0.9.0 wrote, before the constants replaced the hard-coded values inec4700e, and what LibreOffice uses
for the same thing:
oox/source/drawingml/textcharacterpropertiescontext.cxxmaps<w:vertAlign w:val="superscript"/>tobaseline = 30000andsubscriptto-25000. On import itreads
CharEscapement = baseline / 1000and treats it as a percentage, which is why 300000 rendersas a 300% raise rather than being ignored.
Note this is not a schema violation --
baselineisST_Percentage, unbounded intests/resources/schema/ecma-376/dml-main.xsd, and a slide carrying300000validates. The valueis simply ten times too large.
.odpis unaffected: the ODPresentation Writer does not writestyle:text-positionat all, sosuperscript is dropped there whatever the constant says. Separate matter.
Fixes #997
Checklist: