Bug 70184 - FORMATTING: Adobe Type 1 fonts do not appear in the font selection menu
Summary: FORMATTING: Adobe Type 1 fonts do not appear in the font selection menu
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-06 08:09 UTC by Dave Brown
Modified: 2014-07-08 17:18 UTC (History)
2 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 Dave Brown 2013-10-06 08:09:26 UTC
Problem description: 

After I added both some TrueType and some Type1 fonts to Ubuntu 13.04,
only the TrueType fonts appear in the font selection menu of libreoffice tools.

Steps to reproduce:
1. I added both some TrueType and some Type1 fonts to Ubuntu 13.04 'by hand'
The fonts and their metrics were placed in new sub-directories of the corresponding /usr/share/fonts/{truetype,type1} directories.

2. # fc-cache -fv was then run.


3. fc-list shows the fonts as being installed.

4. libreoffice writer and impress do not offer them as selections in the font menu

Current behavior:

Expected behavior:

              
Operating System: Ubuntu
Version: 4.0.2.2 release
Comment 1 Julien Nabet 2013-10-11 21:24:59 UTC
Dave: could you give a link where a free font can be downloaded so we can try to reproduce?
Comment 2 Owen Genat (retired) 2013-11-15 12:42:19 UTC
This problem seems variable according to the particular Type 1 font installed. Here is an example of some Type 1 fonts I have installed here under Crunchbang 11 x86_64 running LO v4.1.3.2:

oweng:~$ fc-list | grep URW | sort
/usr/share/fonts/type1/gsfonts/a010013l.pfb: URW Gothic L:style=Book
/usr/share/fonts/type1/gsfonts/a010015l.pfb: URW Gothic L:style=Demi
/usr/share/fonts/type1/gsfonts/a010033l.pfb: URW Gothic L:style=Book Oblique
/usr/share/fonts/type1/gsfonts/a010035l.pfb: URW Gothic L:style=Demi Oblique
/usr/share/fonts/type1/gsfonts/b018012l.pfb: URW Bookman L:style=Light
/usr/share/fonts/type1/gsfonts/b018015l.pfb: URW Bookman L:style=Demi Bold
/usr/share/fonts/type1/gsfonts/b018032l.pfb: URW Bookman L:style=Light Italic
/usr/share/fonts/type1/gsfonts/b018035l.pfb: URW Bookman L:style=Demi Bold Italic
/usr/share/fonts/type1/gsfonts/p052003l.pfb: URW Palladio L:style=Roman
/usr/share/fonts/type1/gsfonts/p052004l.pfb: URW Palladio L:style=Bold
/usr/share/fonts/type1/gsfonts/p052023l.pfb: URW Palladio L:style=Italic
/usr/share/fonts/type1/gsfonts/p052024l.pfb: URW Palladio L:style=Bold Italic
/usr/share/fonts/type1/gsfonts/z003034l.pfb: URW Chancery L:style=Medium Italic
oweng:~$ fc-list | grep Symbol
/usr/share/fonts/type1/gsfonts/s050000l.pfb: Standard Symbols L:style=Regular
/usr/share/fonts/X11/Type1/Symbol.pfb: Symbol:style=Regular
/usr/share/fonts/type1/mathml/Symbol.pfb: Symbol:style=Regular
oweng:~$ fc-list | grep Gyre
/home/oweng/.fonts/tex-gyre-t1/qcsr.pfb: TeXGyreSchola:style=Regular
/home/oweng/.fonts/tex-gyre-t1/qcsri.pfb: TeXGyreSchola:style=Italic
/home/oweng/.fonts/tex-gyre-t1/qcsbi.pfb: TeXGyreSchola:style=BoldItalic
/home/oweng/.fonts/tex-gyre-t1/qcsb.pfb: TeXGyreSchola:style=Bold

The URW fonts were installed with ghostscript and show up in the Writer drop-down Font Name list. The Symbol fonts were installed with ghostscript and the xfonts-mathml package. Again both Symbol and Standard Symbol show up in the font list. The GNU TeX Gyre Schola font is available:

http://www.gust.org.pl/projects/e-foundry/tex-gyre/schola/qcs2.005bas.zip

The Type 1 files can be found under /fonts/type1/public/tex-gyre/ in the zip but regardless of whether installed into ~/.fonts/ (as shown) or /usr/share/fonts/ (using root privileges) they do not show up in the drop-down font list. As a test, the OTF variant (in the same zip under /fonts/opentype/public/tex-gyre/) if installed, does show up in the list of fonts as "TexGyreSchola".

This would appear to be confirmation of the problem, but if someone else can also confirm using this font (to ensure this is not a problem with my system) that would be great. Thanks.
Comment 3 Julien Nabet 2013-11-15 20:06:31 UTC
After having leafed through several websites including http://en.wikipedia.org/wiki/PostScript_fonts or http://www.acutesystems.com/fonts.htm

Here's the situation for each env:
Linux: pfa / afm (Adobe Font Metrics)
Mac: pfa / afm (+optional .inf)
Windows: pfa / pfm (Printer Font Metrics)

On Windows, just installing pfa/pfm from "/fonts/type1/public/tex-gyre/" is ok with LO 4.1.3 (LO can see the fonts).

On pc Debian x86-64, when trying to install pfa/pfm in ~/.fonts + "fc-cache -f -v", I can't see the fonts.
However, if I use pfa files + afm files from /afm/public/tex-gyre/, it works.
According to the information above, nothing abnormal here.
Just for information, I noticed that Abiword (Debian package 2.9.2) could see fonts just with pfa/pfm.

Dave: did you use Ubuntu package or just fonts found on the net? If last option, were afm files present and if yes, did you include them?

Caolán: what do you think? NOTABUG, enhancement (to include a pfm parser, by using this: http://partners.adobe.com/public/developer/en/font/5178.PFM.pdf), other?
Comment 4 Owen Genat (retired) 2013-11-16 04:32:21 UTC
(In reply to comment #3)
> Here's the situation for each env:
> Linux: pfa / afm (Adobe Font Metrics)
> Mac: pfa / afm (+optional .inf)
> Windows: pfa / pfm (Printer Font Metrics)
 
> On pc Debian x86-64, when trying to install pfa/pfm in ~/.fonts + "fc-cache
> -f -v", I can't see the fonts.
> However, if I use pfa files + afm files from /afm/public/tex-gyre/, it works.
> According to the information above, nothing abnormal here.

Ugh, yes of course, thanks Julien. Just one small correction: The main file for Linux / Windows is a "pfb" (can evidently be "pfa" for Linux), and "pfm" for MacOS. Works as expected under Crunchbang linux once I combine the pfb+afm files as you indicate. Glad to get this sorted b/c I thought it should work.
Comment 5 Julien Nabet 2013-11-16 06:55:57 UTC
Owen: you're right, I really should learn to copy paste instead of letting some typos :-)
Comment 6 Dave Brown 2013-11-16 22:33:08 UTC
(In reply to comment #3)

Julien, Owen,
    Sorry for being slow to answer your earlier questions.

> ...
> Dave: did you use Ubuntu package or just fonts found on the net? If last
> option, were afm files present and if yes, did you include them?
> 
> ...

I had some Adobe fonts that I'd installed on a Windows box that I had used *many* years ago to format some letterhead and a few other things. I wanted to see if I could resuscitate those documents, using LibreOffice writer.  

So I basically installed those 'by hand':  I just plopped the .PFB and .PFM files into ~/.fonts/adobe on my Ubuntu 13.04 system.  So no, there were no .afm files I'm afraid (and this was a bit of a last-ditch effort as I've long since lost or tossed the Adobe installation media that contained those fonts).

Thanks to both of you for having chased this down.  

If you commit a fix, will you let me know how I might procure that so I can give it a try?  That, or any suggestions about where I might track down the .afm variant of the metrics would be greatly appreciated.
-d
Comment 7 Julien Nabet 2013-11-16 22:38:08 UTC
Dave: it might be possible to convert pfm to afm (never tested however),
I found this website to test:
http://convertfonts.com/pfb-to-afm.php
There must be others.
Perhaps too, Fontforge software may help.

Also, did you try to find the fonts on websites?
Comment 8 Julien Nabet 2013-11-16 22:45:15 UTC
Just read this http://computer-programming-forum.com/36-postscript/36596a6de91548ea.htm 
"
 You won't get kerning information and what not if you get AFMs
from the PFBs.  You can, however, get the necessary AFM files
from Adobe's ftp server (you'll have to know the package number
for the fonts you bought):
    ftp://ftp.adobe.com/pub/adobe/type/mac/all/afmfiles
"
By searching a bit, this location seemed interesting:
ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles/

Alternative not perfect reading this (same website):
"
> Ghostscript comes with this:

> NAME
>      pf2afm - Make an AFM file from Postscript (PFB/PFA/PFM) font
>      files using ghostscript

> I'm afraid I don't have any experience with it.

> Regards
> Olaf

But you will only get width and kerning information on those characters
that are
covered by the code page defined in the .pfm file - at most for 224
characters.

The width of all characters can be obtained from the Type1 code itself,
but for the
kerning info, you are restricted to what's in the .pfm.

The original .afm files from Adobe are complete. 
"

(I learn something everyday :-))
Comment 9 Dave Brown 2013-11-16 23:11:12 UTC
> ...
In reply to comment #8)
> Just read this
> http://computer-programming-forum.com/36-postscript/36596a6de91548ea.htm 
> "
>  You won't get kerning information and what not if you get AFMs
> from the PFBs.  You can, however, get the necessary AFM files
> from Adobe's ftp server (you'll have to know the package number
> for the fonts you bought):
>     ftp://ftp.adobe.com/pub/adobe/type/mac/all/afmfiles
> "
> By searching a bit, this location seemed interesting:
> ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles/
> 
> Alternative not perfect reading this (same website):
> "
> > Ghostscript comes with this:
> 
> > NAME
> >      pf2afm - Make an AFM file from Postscript (PFB/PFA/PFM) font
> >      files using ghostscript
> 
> > I'm afraid I don't have any experience with it.
> 
> > Regards
> > Olaf
> 
> But you will only get width and kerning information on those characters
> that are
> covered by the code page defined in the .pfm file - at most for 224
> characters.
> 
> The width of all characters can be obtained from the Type1 code itself,
> but for the
> kerning info, you are restricted to what's in the .pfm.
> 
> The original .afm files from Adobe are complete. 
> "
> 
> (I learn something everyday :-))

(In reply to comment #8)
> Just read this
> http://computer-programming-forum.com/36-postscript/36596a6de91548ea.htm 
> "
>  You won't get kerning information and what not if you get AFMs
> from the PFBs.  You can, however, get the necessary AFM files
> from Adobe's ftp server (you'll have to know the package number
> for the fonts you bought):
>     ftp://ftp.adobe.com/pub/adobe/type/mac/all/afmfiles
> "
> By searching a bit, this location seemed interesting:
> ftp://ftp.adobe.com/pub/adobe/type/win/all/afmfiles/
> 
> Alternative not perfect reading this (same website):
> "
> > Ghostscript comes with this:
> 
> > NAME
> >      pf2afm - Make an AFM file from Postscript (PFB/PFA/PFM) font
> >      files using ghostscript
> 
> > I'm afraid I don't have any experience with it.
> 
> > Regards
> > Olaf
> 
> But you will only get width and kerning information on those characters
> that are
> covered by the code page defined in the .pfm file - at most for 224
> characters.
> 
> The width of all characters can be obtained from the Type1 code itself,
> but for the
> kerning info, you are restricted to what's in the .pfm.
> 
> The original .afm files from Adobe are complete. 
> "
> 
> (I learn something everyday :-))

Thanks, very helpful.  It's far too long now since I thought about any of this sort of stuff, if in fact I ever knew the full details.

But yes, that's why I'd started out by looking for the Adobe media with those fonts.  I was slightly concerned that the .pfb/.pfm were something done for the Windows install (and I think we're talking 3.1 time frame as regards these).  

So I wanted (ideally) to get the complete info for those fonts as provided by Adobe.  

Let me poke about and see if I can get the Adobe metrics from one of the sources you've suggested.

Thanks for the additional information. It's very kind of you Julian!
-d
Comment 10 QA Administrators 2014-06-01 21:30:43 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 11 QA Administrators 2014-07-08 17:18:28 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO