Bug 149700

Summary: Square root symbol misaligned in certain font sizes
Product: LibreOffice Reporter: Rafael Lima <rafael.palma.lima>
Component: Formula EditorAssignee: ⁨خالد حسني⁩ <khaled>
Status: RESOLVED FIXED    
Severity: normal CC: aron.budea, khaled, vsfoote
Priority: medium    
Version: 7.3.2.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=103322
https://bugs.documentfoundation.org/show_bug.cgi?id=101174
https://bugs.documentfoundation.org/show_bug.cgi?id=157965
https://bugs.documentfoundation.org/show_bug.cgi?id=157569
Whiteboard: target:24.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 39750    
Attachments: Sample ODP file
Screenshot showing the problem

Description Rafael Lima 2022-06-23 14:47:00 UTC
Created attachment 180936 [details]
Sample ODP file

The rendering of the square root symbol in Math causes the top line to be misaligned with the left portion of the square root. Moreover, the top bar is sometimes thicker than the rest of the square root.

To reproduce:
1) Open attached sample ODP file. It has two Math objects, the first at 40pt size and the second at 18pt size
2) Zoom in on the 18pt-size formula and notice that the top bar of the square root on the left is very misaligned (very visible at 650% zoom)
3) Zoom in in the 40pt-size formula and notice that the top bar is aligned, but it is thicker than the rest of the square root

Present in:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: cb83063cc0eb4e93bd44bc0cb9b7c4841230cdef
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

And in

Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded
Comment 1 Rafael Lima 2022-06-23 14:48:13 UTC
Created attachment 180937 [details]
Screenshot showing the problem

Here's a screenshot of what I see at 650% zoom in the 18pt-sized formula. Notice that the top bar of the square root on the left is misaligned.
Comment 2 V Stuart Foote 2022-06-24 12:56:09 UTC
Nothing new here. The 'bars' for roots & overs are calculated to compose the sm nodes.

IIUC absent floating point positioning (as for bug 103322), the node calculations for roots and fractions will always be "sloppy".

Font selection also seems to affect the placement--i.e. using a font other than OpenSymbol with a substitution. So getting bug 101174 implemented would probably also help to improve the precision of sm node composition.
Comment 3 ⁨خالد حسني⁩ 2023-09-20 06:50:38 UTC
Fixed with 9e92a17cb6e03beedeeca40bfc8524c2623d31eb