Skip to content

fix(converter): remove default 108% line-height to match LibreOffice output#92

Merged
JSv4 merged 1 commit intomainfrom
feature/remove-default-line-height
Dec 23, 2025
Merged

fix(converter): remove default 108% line-height to match LibreOffice output#92
JSv4 merged 1 commit intomainfrom
feature/remove-default-line-height

Conversation

@JSv4
Copy link
Copy Markdown
Owner

@JSv4 JSv4 commented Dec 23, 2025

Summary

  • Remove hardcoded 108% line-height default from DefineLineHeight() in WmlToHtmlConverter.cs
  • Line-height is now only set when explicitly specified via w:lineRule in the document
  • Improves visual alignment with LibreOffice's HTML rendering for paragraph and line spacing

Background

Previously, DefineLineHeight() unconditionally added line-height: 108% to all unidirectional paragraphs. This made text appear more compressed than LibreOffice's HTML output, which doesn't set any explicit line-height and lets browsers use their default (~120%).

Test plan

  • All 1176 existing tests pass
  • Manual visual comparison shows improved spacing alignment with LibreOffice

…output

Previously, DefineLineHeight() unconditionally added `line-height: 108%`
to all unidirectional paragraphs. This made text appear more compressed
than LibreOffice's HTML output, which doesn't set any explicit line-height
and lets browsers use their default (~120%).

Changes:
- Remove the hardcoded 108% line-height default from DefineLineHeight()
- Line-height is now only set when explicitly specified via w:lineRule
  in the document (already handled by CreateStyleFromSpacing)

This improves visual alignment with LibreOffice's HTML rendering for
paragraph and line spacing.
@JSv4 JSv4 merged commit 73c0ae3 into main Dec 23, 2025
6 checks passed
@JSv4 JSv4 deleted the feature/remove-default-line-height branch December 23, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant