Bug 146724 - Wrong bracket scaling on large text size
Summary: Wrong bracket scaling on large text size
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 22:51 UTC by Francisco
Modified: 2022-05-06 14:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example file for bracket comparison (32.77 KB, application/vnd.oasis.opendocument.presentation)
2022-01-12 22:59 UTC, Francisco
Details
ODP file describing the problem (31.82 KB, application/vnd.oasis.opendocument.presentation)
2022-05-05 23:57 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco 2022-01-12 22:51:58 UTC
Description:
When inserting a formula with large font size, like 18 pt or larger, where brackets, parenthesis or similar are  involved, these aren't properly scaled with font size. 
This particular problem arises when doing cientific presentations or posters (Impress or Draw).

Steps to Reproduce:
1. Crete an ODG or ODP file
2. Insert a formula with scalable parenthesis. It could be a matrix or a mere fraction, for instance, 

left (1 over 2 right )

and exit Equation Editor. The equation looks well, with parenthesis properly scaled.

3. Set a large size, like 32 pts (default size is LibreOffice Impress blank template). It shoul read now

size 32 {left (1 over 2 right )}

and exit the editor again.

Actual Results:
Brackets are poorly scaled, when compared to the default font size obtained after step 2.

Expected Results:
The scaling of the brackets should be proportional to what was obtained for 12 pt typeface.


Reproducible: Always


User Profile Reset: No



Additional Info:
This bug is closely related to bug 32362; when that one is solved, this will be also solved.

Notwithstanding, that bug is difficult to solve because it requires a lot of effort. 

On the other hand, if the handling of parenthesis scaling is done differently for font size expansion than for large objects, this one could be solved; because it seems that LibreOffice scales the bracket up to large front size from a 12 pt  font, when it should scale it from the same font size as set in the formula text.

A workaround for this, plausible when there are only a couple of equations, is shown in the attached file.

1) Create the equation you want in the size you need. 
2) Select the equation is check its size from Size and Position (F4 key)
Record the hight of the drawing
3) Back to the equation, set size 12
4) Open again the size and position,
4.1) uncheck "protect size", 
4.2) check "keep proportion",
4.3) and set the hight of the 18 pt size equation and exit.
Now you have a beautiful equation.

Another possible workaround, only useful for Impress, is to set a smaller slide size. Default font size is 32 pt and slide is 28 cm wide. For going to a font size of 12 pts, we need a 10.5 cm wide.
Comment 1 Francisco 2022-01-12 22:59:04 UTC
Created attachment 177509 [details]
example file for bracket comparison

File showing the problem and the workaround.
Comment 2 Francisco 2022-01-12 23:13:57 UTC
(In reply to Francisco from comment #0)
...
> 4.3) and set the hight of the 18 pt size equation and exit.
...

Sorry, it should be "32 pt size".
Comment 3 Rafael Lima 2022-05-05 23:57:33 UTC
Created attachment 179953 [details]
ODP file describing the problem

I can confirm the weird behavior with parenthesis scaling.

Basically, setting the font size using the "size 32" command will cause the parentheses to scale weirdly. However. if you do not use the "size 32" command and instead go to Format - Font Size (in Math) and change the Base size to 32, then the parentheses will scale correctly.

See attached ODP file for more information.

I am setting this to NEW because using the "size" command should change the Base size the same way the "Format - Font Size" menu does.
Comment 4 Francisco 2022-05-06 14:07:12 UTC
(In reply to Rafael Lima from comment #3)
> Created attachment 179953 [details]
> ODP file describing the problem
> 
> I can confirm the weird behavior with parenthesis scaling.
> 
> Basically, setting the font size using the "size 32" command will cause the
> parentheses to scale weirdly. However. if you do not use the "size 32"
> command and instead go to Format - Font Size (in Math) and change the Base
> size to 32, then the parentheses will scale correctly.
> 
> See attached ODP file for more information.
> 
> I am setting this to NEW because using the "size" command should change the
> Base size the same way the "Format - Font Size" menu does.

Thank you, Rafael, for your time and the new example file. I think it's clearer than the one I uploaded.