Bug 138859 - FILEOPEN DOC: Font combobox always shows font as "0"
Summary: FILEOPEN DOC: Font combobox always shows font as "0"
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected
Depends on:
Blocks: DOC-Character
  Show dependency treegraph
 
Reported: 2020-12-12 15:48 UTC by John
Modified: 2023-04-15 16:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Cleaned .doc (3.72 KB, application/rtf)
2020-12-12 15:50 UTC, John
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John 2020-12-12 15:48:14 UTC
Description:
I get Word (.doc) forms (which internally seem to be really RTFs). I have to fill in the forms, convert to PDF and send the result back.

When viewing the doc in LO, selecting a text, the font shown is always '0'. Inside the doc, two fonts are named: 
{\fonttbl{\f1\fcharset1 Verdana}{\f2\fcharset1 Arial Narrow}}
and all texts in the .doc are assigned to either \f1 or \f2

When defining entries in the Font Translation Table, no effect can be seen if I enter, eg.,
    Arial Narrow           Archivo Narrow
and press Apply (or reload the document)



Steps to Reproduce:
1. Open the attached .doc
2. Set cursor on first field (Ingenieria) This text is declared as 'Verdana'. Font field shows '0'
3. Set cursor on Processing. This text is declared as "Arial Narrow" Font field show '0'
4. Declare in the font translate table  'Arial Narrow' replace with 'ArchivoNarrow' (install if necessary)
5. Apply - nothing changes.

Actual Results:
2. This text is declared as 'Verdana'. Font field shows '0'
3. This text is declared as "Arial Narrow" Font field show '0'
5. Apply - nothing changes.

Expected Results:
2. Font field shows 'Verdana'.  
3. Font field show "Arial Narrow"
5. Should re-format the text on-screen


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Distro in in fact Slackware64-current

Notes:

If I enter (in the font translate table) a convert rule with fonr '0' to 'ArchivoNarrow' the translate table works! But, as both text fonts appear as '0', I can't distinguish between both. So this issue seems to be reduced to LO not marking the text font correctly.
Comment 1 John 2020-12-12 15:50:00 UTC
Created attachment 168105 [details]
Cleaned .doc
Comment 2 Dieter 2020-12-27 16:30:05 UTC
I confirm it with

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce:
1. open attaches file from comment 1
2. Put cursor in any character you like

Result: Font is always displayed as "0" (except end of line after "absent")

Comparison with MS Word 2016: Font is displayed correct.
Comment 3 Justin L 2021-04-07 19:27:35 UTC
In LO 4.3, prior to it showing 0, it showed the default font (TNR, and then Liberation Serif). Somewhere in this small range of commits, it changed to 0.
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=477684669a03e7c6048b804ca3f3ebec43a4d071..a6e19ea7a8885dcbdb1d8b2f56586373595ba8aa.

Miklos has two RTF commits in that range that are related to fonts.  (sprm:CRgFtc{0,1,2} tokens).

I'm not going to mark it as a regression though because it sounds like this example document is corrupt/malformed.
Comment 4 QA Administrators 2023-04-08 03:25:12 UTC Comment hidden (obsolete)
Comment 5 Dieter 2023-04-15 16:07:04 UTC
WORKSFORME in

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded