Bug 42901 - duplicated .pfb fonts with non-duplicate .afm results in neither being available
Summary: duplicated .pfb fonts with non-duplicate .afm results in neither being available
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
3.4.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
Whiteboard: target:3.5.2
Depends on:
Reported: 2011-11-14 01:14 UTC by gilbert_kok
Modified: 2013-11-25 15:03 UTC (History)
3 users (show)

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

screenshot (36.00 KB, image/png)
2012-02-10 04:24 UTC, Caolán McNamara
output of fc-list -v (3.18 KB, text/plain)
2012-02-14 04:20 UTC, gilbert_kok
Screenshot without the .fonts/opens___.ttf file (109.57 KB, image/png)
2012-02-14 04:22 UTC, gilbert_kok
Screenshot with the .fonts/opens___.ttf file (109.75 KB, image/png)
2012-02-14 04:23 UTC, gilbert_kok

Note You need to log in before you can comment on or make changes to this bug.
Description gilbert_kok 2011-11-14 01:14:09 UTC
Since the upgrade to LibreOffice 3.4.3, it is no more possible to select the URW Chancery L font!
I have several hundred of pages of documents using this font which are now uncorrectly formated.
For me this is a serious regression issue.
Note that other applications on my PC, like AbiWord, are still able to use the URW Chancery L font.
Comment 1 gilbert_kok 2011-11-14 01:19:25 UTC
Same problem with Impress, Writer, Drawer and Calc.
Comment 2 Florian Reisinger 2012-01-23 01:21:20 UTC
Please try with 3,5
Comment 3 stephane.purnelle 2012-01-29 06:25:17 UTC
Today, updated to 3.5 rc2
URW Chancery L font is always unavailable

Debian 6 32-bits
Comment 4 Jean-Baptiste Faure 2012-01-29 14:04:57 UTC
I do not reproduce with 3.5.0 rc2+ (LibreOffice 3.5.0rc2+ Version ID : 20ec7c1-ed94322-5cd2479-2386a41-138191a) under Ubuntu 11.10 with gnome-shell. Same thing with LO 3.4.5 vanilla and LO 3.4.5 from Ubuntu repository (Oneiric_proposed).
This font is usable for me in Writer and Impress.

What is the particularity of this font ?

Best regards. JBF
Comment 5 gilbert_kok 2012-01-30 01:59:33 UTC
I had still the same problem with 3.4.4, but I found a workaround by copying the old Openoffice font file which was still on the system but which is apparently no more used by LibreOffice :

cd $HOME
ls -lda .fonts
if .fonts does not exist :  mkdir .fonts
cd .fonts
cp /usr/share/fonts/truetype/openoffice/opens___.ttf .
check/change the file permissions :
chown <your_user_name> opens___.ttf
chmod 644 opens___.ttf

Restart LibreOffice, the font should be available... 

I also installed LibreOffice 3.4.4 on another PC, but no problem on this one!
Comment 6 Jean-Baptiste Faure 2012-01-30 04:44:40 UTC
opens___.ttf is OpenSymbol font. What is the link with "URW Chancery L" ?
On my Ubuntu 11.10 I found the font "URW Chancery L" in the package gsfonts ; gs means Ghostscript here ...

Best regards. JBF
Comment 7 sasha.libreoffice 2012-02-10 04:05:40 UTC
@ Caolan
Please, take look on this bug when will have time
Comment 8 Caolán McNamara 2012-02-10 04:24:48 UTC
Created attachment 56861 [details]
Comment 9 Caolán McNamara 2012-02-10 04:27:42 UTC
Well, it works fine for me. I don't quite understand what connection between OpenSymbol and a missing "URW Chancery L" there could be

I presume that if you do from a terminal...

$ fc-list "URW Chancery L"

that you get...

URW Chancery L:style=Medium Italic

Is this with libreoffice that came from the distro, or libreoffice downloaded from our site.
Comment 10 gilbert_kok 2012-02-14 03:43:08 UTC
1) About the opens___.ttf file : obviously, this file contains the URW Chancery L font.
As for an obscure reason, the URW Chancery L font was no more available in Libreoffice, a workaround to make the font available is to put the opens___.ttf file in the .fonts directory.  
On my desktop, if I rename the .fonts directory and I restart a Libreoffice application, the URW Chancery L font disappears from the list (see screenshot).
If the .fonts directory containing the opens___.ttf file is restored, the URW Chancery L font appears in the list.  

2) Yes with 
$ fc-list "URW Chancery L"

I get ...

URW Chancery L:style=Medium Italic

3) The bug is with LibreOffice installed from the Ubuntu Software Center.  I did not tried to download the software from the site.
After having installed Ubuntu 11.10 and LibreOffice it was working fine, but the problem appeared later after an update of Ubuntu. 
I already tried to remove and reinstall LibreOffice with the Ubuntu Software Center, but without success.
Comment 11 Caolán McNamara 2012-02-14 04:06:59 UTC
"the opens___.ttf file : obviously, this file contains the URW Chancery L font"
it doesn't you see, that's why we're baffled :-), that's the OpenSymbol font.

fc-list -v "URW Chancery L" should list the location where that's installed, e.g. /usr/share/fonts/default/Type1/z003034l.pfb for me
Comment 12 gilbert_kok 2012-02-14 04:20:40 UTC
Created attachment 57031 [details]
output of fc-list -v
Comment 13 gilbert_kok 2012-02-14 04:22:23 UTC
Created attachment 57032 [details]
Screenshot without the .fonts/opens___.ttf file
Comment 14 gilbert_kok 2012-02-14 04:23:11 UTC
Created attachment 57033 [details]
Screenshot with the .fonts/opens___.ttf file
Comment 15 gilbert_kok 2012-02-15 00:18:53 UTC
The full output of the fc-list -v command is in attachment.
Result of 
fc-list -v "URW Chancery L" | grep "file:"
	file: "/usr/share/fonts/type1/gsfonts/z003034l.pfb"(s)
	file: "/usr/share/fonts/X11/Type1/z003034l.pfb"(s)

Note that I installed Ubuntu 11.10 and LibreOffice 3.4.4 on my laptop and it works fine on this one...
Comment 16 gilbert_kok 2012-02-17 00:01:37 UTC
I did some more tests : 
Adding a copy of any font file from the /usr/share/fonts into $HOME/.fonts make the URW Chancery L font available!
The content of this file does no matter as long as it is a valid font file...
Comment 17 Caolán McNamara 2012-02-17 04:50:01 UTC
hmm, that's interesting, so...

    file: "/usr/share/fonts/type1/gsfonts/z003034l.pfb"(s)
    file: "/usr/share/fonts/X11/Type1/z003034l.pfb"(s)

suggests there are two files that provide that font, can you attach those two files here and perhaps if I put them into equivalent positions here and remove my local ~/.fonts dir I'd be able to reproduce this as well
Comment 18 Caolán McNamara 2012-02-17 13:09:29 UTC
indeed, if I ditch my .fonts dir and then duplicate z003034l.pfb into two system-wide locations I can reproduce this with 3.4.5

Almost certainly my bug, and a bad sort ordering
Comment 19 Caolán McNamara 2012-02-17 13:12:19 UTC
either isPreviouslyDuplicateOrObsoleted or SortFont would be my guess
Comment 20 gilbert_kok 2012-02-19 01:30:17 UTC
Indeed, on my system, the second file in the X11 directory is a symbolic link to the first file and if I remove this link, the problem is solved...
Comment 21 Not Assigned 2012-02-20 04:22:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":


Resoves fdo#42901 duplicated .pfb without duplicated .afm drops font
Comment 22 Caolán McNamara 2012-02-20 04:23:22 UTC
fixed with http://cgit.freedesktop.org/libreoffice/core/commit/?id=65a3ec97b5032d1748c8f84eeb0b8656e1c25918

turns out that the problem isn't simply the duplication of the font, its that the duplicate .pfb doesn't come with a duplicate .afm so the duplicate is "invalid" so we dismiss the link because it doesn't have a .afm and then we dismiss the "valid" one because its a duplicate font that we already processed.

So now throwing out invalid fonts from the fontset when discovered, so valid ones aren't considered duplicates of invalid ones and so get picked up correctly
Comment 23 Jean-Baptiste Faure 2012-02-26 05:09:18 UTC
If it is technically possible, I think this fix should be backported to 3.5.x

Best regards. JBF
Comment 24 Not Assigned 2012-02-28 01:02:13 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":


Resoves fdo#42901 duplicated .pfb without duplicated .afm drops font

It will be available in LibreOffice 3.5.2.