Bug 149700 - Square root symbol misaligned in certain font sizes
Summary: Square root symbol misaligned in certain font sizes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2022-06-23 14:47 UTC by Rafael Lima
Modified: 2023-12-14 13:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODP file (20.24 KB, application/vnd.oasis.opendocument.presentation)
2022-06-23 14:47 UTC, Rafael Lima
Details
Screenshot showing the problem (42.76 KB, image/png)
2022-06-23 14:48 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
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