Bug 41360 - FORMATTING Problem with fontsize in style when expressed in percentage
Summary: FORMATTING Problem with fontsize in style when expressed in percentage
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 70615 122566 (view as bug list)
Depends on:
Blocks: Font-Size
  Show dependency treegraph
 
Reported: 2011-09-30 02:13 UTC by Paolo Benvenuto
Modified: 2026-01-26 21:25 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Benvenuto 2011-09-30 02:13:51 UTC
See http://openoffice.org/bugzilla/show_bug.cgi?id=4279

Define a new style based on another style, with fontsize 90%: the font size remain 90%.

Define a new style based on another style, with fontsize 100%: next time you open the style you see that the font size isn't expressed in percentage any more: it's converted to the value of the based on style.

This is a problem since if you modify the first style, you new style won't be
modified accordingly.

This bug oblige the user that wants to work with the % feature to use 99% or 101% values if he doesn't want to loose the connection with the based on font size.

Example:

- Define default style as Font=Times Pt 12
- Define Style "MyStyle" based on Default with Font size =101%
- Save and open, the size is still 101% as expected.
- Change MyStyle to font size=100% and save
- Edit the new style and look at the font size. The size is now 12 pt.
Comment 1 bugzillamail6853 2011-12-21 15:49:06 UTC
I can confirm this bug in 3.4.4 release.

To reproduce:
1: Create a character style (*not* a paragraph style) named StCParent.
2: Create a character style StCChild, set "Linked with" to "StCParent".
3: Enter ie. 50% in Font Size of "StCChild".
4: Enter some text and apply "StCChild" character style to it.
5: Change Font Size of "StCParent" to let's say 36pt.
6: Text size will not change, when it should change to 18pt (50% of 36pt).
7: Go to character style properties dialog of "StCChild" and click Apply. Now the
text size changes, as expected earlier in step 6.

Everything works properly with paragraph styles, though.

It really is a shame, that after all these years, with all those new features
and improvements being introduced all the time to the software, such a seemingly
basic and crucial glitch has not been fixed yet.
Comment 2 Björn Michaelsen 2011-12-23 12:39:28 UTC Comment hidden (obsolete)
Comment 3 Florian Reisinger 2012-08-14 13:59:55 UTC Comment hidden (obsolete)
Comment 4 Florian Reisinger 2012-08-14 14:01:04 UTC Comment hidden (obsolete)
Comment 5 Florian Reisinger 2012-08-14 14:05:49 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:07:50 UTC Comment hidden (obsolete)
Comment 7 Paolo Benvenuto 2012-08-14 18:33:43 UTC
still present in 3.5.5.3, it's a very annoying long lasting bug: you cannot define a font size style as 100% of another style font size!
Comment 8 Roman Eisele 2012-08-22 08:15:00 UTC
IMHO there are two different (but maybe related) bugs in this issue:

1) The original description (and the linked AOO bug report) talk specifically
   about "defin[ing] a font size style as 100% of another style font size",
   and so does comment #7.

2) Comment #1 mentions a (maybe even more important) general problem about
   relative font sizes in character styles.

I can confirm both issues [REPRODUCIBLE] with LibreOffice 3.6.1.1 (Build ID: 4db6344), German langpack installed, on MacOS X 10.6.8 (Intel).

I have to lower the severity a bit, because "critical" are only bugs which cause crashes, massive data loss, etc. No offence! This does not mean that this bug is not important; it just means that there are even more important bugs ...
Comment 9 Roman Eisele 2012-08-22 09:21:46 UTC
@ our Writer experts:
Hello Cédric, Michael, and Miklos,

this is yet another interesting bug report for Writer. The form of the report
is a bit unlucky (IMHO there are two related bugs involved in this issue,
see my comment #8; if you want I can split the bug into two distinct reports!),
but it is nevertheless important -- inconsistent behaviour is already especially annoying for users.

There is also a link to a related Apache OOO bug report which already contains some hints to the roots of at least one of both issues.

So please take a look at this report. Tell me if I (as a simple bugwrangler)
can do anything to help you with fixing this issue.

Thank you very much in advance!
Comment 10 Cédric Bosdonnat 2014-01-20 08:57:55 UTC Comment hidden (noise)
Comment 11 Joel Madero 2014-11-06 03:13:28 UTC
Should be set to NEW not REOPENED. Changing per comment 8.
Comment 12 Paolo Benvenuto 2015-07-18 20:27:53 UTC
I agree with separating the 2 bugs of my submission and comment 1
Comment 13 Paolo Benvenuto 2015-07-18 20:35:16 UTC
https://bz.apache.org/ooo/show_bug.cgi?id=4279 is the working link for the corresponding Ooo bug
Comment 14 Paolo Benvenuto 2015-07-18 20:39:00 UTC
How much would it cost to fix this bug, at least the original formulation? any developer could fix it for money?
Comment 15 Joel Madero 2015-07-18 21:54:27 UTC
My suggestion is to reach out to some of the certified developers to ask - no one will answer directly on the bug but my guess is several hundred euros at least.

https://www.documentfoundation.org/certification/developers/
Comment 16 Paolo Benvenuto 2017-04-21 12:05:57 UTC
Anyone could suggest me what file should I work in order to try fixing the bug? thank you!
Comment 17 Paolo Benvenuto 2017-04-21 13:03:08 UTC
in editeng/source/item I'm seeing many checks for a value of 100 in the percentage and converts the value to an absolute one.

What it it for?

What about simply removing those checks so that the 100% value isn't converted?
Comment 18 Paolo Benvenuto 2017-12-27 16:18:23 UTC
I put a bounty on this bug:

https://www.bountysource.com/issues/11630578-formatting-problem-with-fontsize-in-style-when-expressed-in-percentage

Please add you own bounty if you want it to be fixed!
Comment 19 QA Administrators 2019-10-30 03:37:05 UTC Comment hidden (obsolete)
Comment 20 Paolo Benvenuto 2019-11-01 15:26:59 UTC
still present in version 6.3.2.2 (ubuntu 18.04 via ppa)
Comment 21 Regina Henschel 2019-11-23 17:36:38 UTC
*** Bug 122566 has been marked as a duplicate of this bug. ***
Comment 22 Regina Henschel 2019-11-23 17:37:21 UTC
Some background from OOo is in https://issues.apache.org/ooo/show_bug.cgi?id=4279
Comment 23 Regina Henschel 2019-11-23 17:37:44 UTC
*** Bug 70615 has been marked as a duplicate of this bug. ***
Comment 24 QA Administrators 2023-04-08 03:25:18 UTC Comment hidden (obsolete)
Comment 25 RGB 2023-04-08 16:13:29 UTC
I can confirm what's in Comment 1 with 

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: es-ES (es_ES.UTF-8); UI: es-ES
Calc: threaded

Only after entering the child style settings and saving, even without modifications, the font size is updated.
Comment 26 Paolo Benvenuto 2023-04-08 17:58:37 UTC
(In reply to bugzillamail6853 from comment #1)
> I can confirm this bug in 3.4.4 release.
> 
> To reproduce:
> 1: Create a character style (*not* a paragraph style) named StCParent.

My original report referse to paragraphs styles, not character style. The character styles bug seems a different one.
Comment 27 Paolo Benvenuto 2023-04-08 17:59:19 UTC
(In reply to RGB from comment #25)
> I can confirm what's in Comment 1 with 
> 
> Version: 7.5.2.2 (X86_64) / LibreOffice Community
> Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
> CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: es-ES (es_ES.UTF-8); UI: es-ES
> Calc: threaded
> 
> Only after entering the child style settings and saving, even without
> modifications, the font size is updated.

As I explained, comment 1 is another bug
Comment 28 Paolo Benvenuto 2023-04-08 18:01:02 UTC
The bug is confirmed in Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: es-DO (it_IT.UTF-8); UI: it-IT
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.2
Calc: threaded

Nothing make me think that it could be fixed in a newer LO version.
Comment 29 Gwyn Ciesla 2024-01-16 20:28:18 UTC
Confirmed in 24.2.0.1.
Comment 30 Paolo Benvenuto 2024-04-27 01:15:17 UTC
confirmed inç

Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (C.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.2-0ubuntu1
Calc: threaded
Comment 31 Paolo Benvenuto 2026-01-26 10:25:32 UTC
actually the *real* bug is not that you cannot set relative font size to 100%, that is the way libreoffice works.

The real bug is that, when reverting childs font size to 100%, or to the same absolute value, or to +0pt, inheritance isn't set.

We need that, if the child has font size different from parent, and the child font size is reverted to be equal to parent's, inheritance is restored.
Comment 32 Paolo Benvenuto 2026-01-26 11:52:51 UTC
https://bugs.documentfoundation.org/show_bug.cgi?id=41360#c1 the bug explained in comment1 seems fixed.
Comment 33 Regina Henschel 2026-01-26 15:52:13 UTC
(In reply to Paolo Benvenuto from comment #31)
> actually the *real* bug is not that you cannot set relative font size to
> 100%, that is the way libreoffice works.
> 
> The real bug is that, when reverting childs font size to 100%, or to the
> same absolute value, or to +0pt, inheritance isn't set.
> 
> We need that, if the child has font size different from parent, and the
> child font size is reverted to be equal to parent's, inheritance is restored.

No. A strong -1 from me.

Setting a value to the same value as the parent should not change it to inheritance. Instead for inheritance, the user needs an easy way to set "inherit" for only a specific property. Currently all properties of the tab are affected. That is tracked in bug 88559 and its duplicates.

The error is still that a percent value 100% set by the user is replaced by an absolute value. So please fix exact this. The workaround to use 99% or 101% to get a relative font size, should not be necessary.