Bug 83090 - UI: Entered font sizes (e.g., 12.4 pt, 12.7 pt) are being rounded off (rather than up) in the toolbar / sidebar
Summary: UI: Entered font sizes (e.g., 12.4 pt, 12.7 pt) are being rounded off (rather...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: BSA target:7.3.0
Keywords:
Depends on:
Blocks: Font-Size
  Show dependency treegraph
 
Reported: 2014-08-26 09:24 UTC by rayhogenson
Modified: 2021-10-08 18:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
0.1 pt size variant text in a few fonts provided with LOv4312 (18.78 KB, application/vnd.oasis.opendocument.text)
2014-09-14 04:38 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rayhogenson 2014-08-26 09:24:09 UTC
Problem description:
When typing in a manual font size, such as 10.7, the font rounds off to a multiple of 0.2 or a multiple of 0.5.  I can't see a reason why all sizes can't be supported.

Steps to reproduce:
1. Open a document
2. Click in the font size box, and type in 10.7
3. Font size is changed to 10.6

Current behavior:
Font sizes are rounded to a multiple of 0.2 or 0.5.

Expected behavior:
Any font size should be acceptable, and possible to use.
              
Operating System: Linux (Other)
Version: 4.2.6.2 release
Comment 1 Yousuf Philips (jay) (retired) 2014-09-14 00:51:42 UTC
Hello rayhogenson,

Thank you for submitting the bug. I can confirm this behaviour in 3.3.0 and master, though i'm not sure if this is something worth fixing as values rounded to the closest .1 are not that different that ones rounded to .2, but i will await others to opinion on this.
Comment 2 Owen Genat (retired) 2014-09-14 04:38:16 UTC
Created attachment 106240 [details]
0.1 pt size variant text in a few fonts provided with LOv4312

(In reply to comment #0)
> When typing in a manual font size, such as 10.7, the font rounds off to a
> multiple of 0.2 or a multiple of 0.5.

Under GNU/Linux using v4.3.1.2 I see different behaviour. This is what I see displayed after manually editing the Font Size value in the toolbar:

Entered Displayed fo:font-size
------- --------- ------------
12.0    12        12pt
12.1    12.1      12.1000003814697pt
12.2    12.1      12.1999998092651pt
12.3    12.3      12.3000001907349pt
12.4    12.3      12.3999996185303pt
12.5    12.5      12.5pt
12.6    12.6      12.6000003814697pt
12.7    12.6      12.6999998092651pt
12.8    12.8      12.8000001907349pt
12.9    12.8      12.8999996185303pt
13.0    13        13pt

The text, as rendered on screen, does actually change size in each and every case, it is just the display in the toolbar / sidebar that appears to be rounded off (rather than up). This may be a floating point issue.
Comment 3 Robinson Tryon (qubit) 2014-09-25 21:38:17 UTC
(In reply to comment #2)
> The text, as rendered on screen, does actually change size in each and every
> case, it is just the display in the toolbar / sidebar that appears to be
> rounded off (rather than up). This may be a floating point issue.

If the font size in use is changing, but the displayed size is not, then that's definitely a bug we should address, regardless of whether we decide to round font sizes to a particular tolerance.

Removing need*Advice tags from the whiteboard.
Comment 4 Owen Genat (retired) 2014-09-27 15:07:03 UTC
Thanks Robinson. Summary amended for clarity.
Comment 5 crxssi 2014-12-24 19:57:11 UTC
This bug has been annoying me for years.  Note that it only displays incorrectly on the toolbar.  If you check your font under format-> character it will show the correct value.  It is pretty amazing how long this bug has been affecting OO/LO.

In comment #2, I have no idea where he is getting those "fo:font-size" values.
Comment 6 Yousuf Philips (jay) (retired) 2014-12-25 10:01:55 UTC
(In reply to crxssi from comment #5)
> This bug has been annoying me for years.  Note that it only displays
> incorrectly on the toolbar.  If you check your font under format-> character
> it will show the correct value.  It is pretty amazing how long this bug has
> been affecting OO/LO.

Thanks for pointing out this other place.

> In comment #2, I have no idea where he is getting those "fo:font-size"
> values.

These are the values stored in the odt xml file (attachment 106240 [details]).
Comment 7 QA Administrators 2016-01-17 20:03:09 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-03-06 14:05:03 UTC Comment hidden (obsolete)
Comment 9 rayhogenson 2017-03-06 21:00:29 UTC
I am running libreoffice 5.3.0 on Arch Linux, and the bug is still present with no changes in behavior.
Comment 10 QA Administrators 2018-03-07 03:41:39 UTC Comment hidden (obsolete)
Comment 11 rayhogenson 2018-03-08 22:54:50 UTC
The bug is still present.

Info from Help - About Libreoffice:
Version: 6.0.2.1.0+
Build ID: Gentoo official package
CPU threads: 4; OS: Linux 4.9; UI render: default; VCL: x11; 
Locale: en-US (en_US.utf8); Calc: group
Comment 12 QA Administrators 2019-11-06 03:31:28 UTC Comment hidden (obsolete)
Comment 13 Mike 2020-06-30 13:50:19 UTC
repro

Version: 7.0.0.0.beta2 (x64)
Build ID: 1c213561a365b5666167321de68c9977500c9612
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: en-US (de_DE); UI: en-US
Calc: threaded
Comment 14 Commit Notification 2021-10-08 18:27:15 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cab77a48da1d481ddae24c9bd273ba4e7585b81c

tdf#83090 - Allow any font size in the toolbar/sidebar

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.