Bug 123397 - Document loaded with bold font instead of normal
Summary: Document loaded with bold font instead of normal
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
Whiteboard: odf
Depends on:
Blocks: Fonts
  Show dependency treegraph
Reported: 2019-02-12 09:19 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2023-06-01 19:28 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

bugdoc (16.31 KB, application/vnd.oasis.opendocument.text)
2019-02-12 09:19 UTC, Samuel Mehrbrodt (allotropia)
actual (46.09 KB, application/pdf)
2019-02-12 09:19 UTC, Samuel Mehrbrodt (allotropia)
expected (38.37 KB, application/pdf)
2019-02-12 09:19 UTC, Samuel Mehrbrodt (allotropia)
bugdoc compared OO and LO 6.3+ (99.89 KB, image/jpeg)
2019-02-12 10:14 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2019-02-12 09:19:00 UTC
Created attachment 149210 [details]

Open the attached document in LibreOffice 6.1.6.
The document font is bold.

In the font is normal.

Looks like a regression in either 6.1.5 or 6.1.6.
Comment 1 Samuel Mehrbrodt (allotropia) 2019-02-12 09:19:20 UTC
Created attachment 149211 [details]
Comment 2 Samuel Mehrbrodt (allotropia) 2019-02-12 09:19:46 UTC
Created attachment 149213 [details]
Comment 3 Timur 2019-02-12 10:14:03 UTC
Created attachment 149214 [details]
bugdoc compared OO and LO 6.3+

Seems to me that text was always bold. No repro not bold. Test in Windows.
Comment 4 Samuel Mehrbrodt (allotropia) 2019-02-12 10:20:07 UTC
Maybe it's Linux only, at least OpenOffice 3.2 on Linux displayed the text non-bold (as shown in attachment 149213 [details]).
Comment 5 Xisco Faulí 2019-02-12 12:20:40 UTC
I can't reproduce it in

Id. de compilación: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

nor in

ID de la construcció: 1:6.1.4-0ubuntu0.16.04.1~lo2
Fils de CPU: 4; SO: Linux 4.15; Renderitzador de la IU: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_ES.UTF-8); Calc: group threaded

however, using the bisect repositories i can reproduce it in

Build ID: c7ad7849d54fd3dad67e7779102f65b8b2f04881
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded


Build ID: ffeb03625f31fd3a88b7c0f0bccf57d0aeeca25c

only reproducible in development enviroments ??
Comment 6 Samuel Mehrbrodt (allotropia) 2019-02-12 14:01:41 UTC
There is a difference in LibreoOffice TDF version vs Ubuntu version.
In the Ubuntu version it is shown as non-bold while in the TDF version it is shown as bold.
Comment 7 Samuel Mehrbrodt (allotropia) 2019-02-13 06:49:31 UTC
michaelweghorn> for me, text of tdf#123397 doc is shown in bold with libreoffice package 1:6.1.5~rc1-2  in debian testing
Comment 8 Michael Stahl (allotropia) 2019-02-13 10:37:07 UTC

            <text:p text:style-name="P8">01<text:tab/>Wohnsitz des Antragsgegners oder eines Mitantragsgegners</text:p>

    <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Table_20_Contents">
      <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false">
          <style:tab-stop style:position="0.397cm"/>

    <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-adornments="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>

    <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
      <style:text-properties style:font-name="Arial1" fo:font-size="7pt" fo:font-weight="normal"/>

so we have style:font-adornments="Standard" and fo:font-weight="normal", i don't see where the bold is supposed to come from?
Comment 9 Michael Stahl (allotropia) 2019-02-13 10:52:16 UTC

    <style:style style:name="Standard" style:family="paragraph" style:class="text" style:master-page-name="">
      <style:text-properties style:font-name="Arial Black" fo:font-size="10pt" fo:font-weight="900"/>

somehow the fo:font-weight="900" of the parent style "Standard" is not overwritten by the fo:font-weight="normal" of the derived style "Table Contents".
Comment 10 Michael Stahl (allotropia) 2019-02-14 09:47:53 UTC
if you use e.g. de_DE locale, you get "Regular" font weight.

but with en_US you get "Black" font weight.

the problem is that this style:

    <style:style style:name="Table_20_Contents_20__28_user_29_" style:display-name="Table Contents (user)" style:family="paragraph" style:parent-style-name="Standard">
      <style:paragraph-properties ns3:contextual-spacing="false" fo:margin-top="0.049cm" fo:margin-bottom="0.049cm" style:vertical-align="middle"/>
      <style:text-properties style:font-name="Arial" fo:font-size="7.5pt" style:font-name-complex="Arial" style:font-size-complex="7.5pt"/>

"Table Contents (user)" will be mapped to the same internal SwTextFormatColl as the built-in style "Table Contents", but *only* if it matches the locale's translation of "Table Contents".
Comment 11 Michael Stahl (allotropia) 2019-02-14 13:45:10 UTC
this could be fixed by:

1) reworking SwFormat etc. (haven't checked which of the 5-6 classes are actually subclasses of SwFormat) in Writer document model so it stores the "programmatic name" (as used in ODF/other file formats) instead of the "UIName" that is shown in the UI, and then moving the FillUIName / FillProgName conversions out of the "unocore" classes and into all UI classes that display style names.

2) making use of the SwFormat's m_nPoolFormatIds as a second part of the lookup key, so that we can store styles with same name but one has a pool-id and the other does not; not sure which/how many places would need to know whether they want a pool-style or not though.

either of these is a bit of work; anything simpler looks like it's going to cause some kind of problem or other...
Comment 12 Xisco Faulí 2019-06-26 09:07:23 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2021-08-14 04:05:15 UTC Comment hidden (obsolete)
Comment 14 Timur 2022-03-17 13:44:53 UTC
Seems very minor, can be easily fixed with setting Default Style, which is empty, to Regular font style.
But Default Style should not be empty. Maybe this should be closed.