Bug 840416

Summary: FifthLeg font not supported by server side rendering
Product: [openSUSE] openSUSE 12.3 Reporter: Christopher Yeleighton <giecrilj>
Component: OtherAssignee: Petr Gajdos <pgajdos>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P3 - Medium CC: pgajdos, sndirsch, thomas.schraitle
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 12.3   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 843949    

Description Christopher Yeleighton 2013-09-14 21:55:32 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:23.0) Gecko/20100101 Firefox/23.0 SeaMonkey/2.20

The FifthLeg font is classified as an X11 font but X11 does not support it.

Reproducible: Always

Steps to Reproduce:
  1.  Install the package fifth-leg-font.
  2.  Find the font in xfontsel.
Actual Results:  
  2. Nope.

Expected Results:  
  2. -*-fifthleg-*-r-normal-*-*-*-*-*-*-*-iso10646-1

The font is apparently available as a client font only.  The font should be reclassified into Publishing (hence Minor).
Comment 1 Stefan Dirsch 2013-09-16 09:53:53 UTC
Did you run fonts-config afterwards as root and of course 'xset fp rehash' as logged in user? Unfortunately the former is required since someone had the glorious idea to get rid of SuSEconfig(.fonts). :-(
Comment 2 Christopher Yeleighton 2013-09-17 20:19:56 UTC
Yes, I did.  I suppose that OTF fonts are not supported by the X server.
Comment 3 Stefan Dirsch 2013-09-18 08:15:04 UTC
They are. And I see such XLFD lines in xlsfonts output.
Comment 4 Christopher Yeleighton 2013-09-19 18:38:49 UTC
I ran mkfontscale and mkfontdir as root and the problem disappeared.  But shouldn’t that thing be run from %post?
Comment 5 Christopher Yeleighton 2013-09-19 18:44:07 UTC
Also, while xfontsel does allow to select the font now, it is unable to show it; the font preview area does not refresh.  When I open a pop-up menu to select anything, the trace of the part of the menu covering the preview area remains there.
Comment 6 Christopher Yeleighton 2013-09-19 18:56:02 UTC
{ xfd -fn '-*-fifthleg-medium-r-*-*-17-*-*-*-*-*-iso10646-1'; }
Warning: Cannot convert string "-*-fifthleg-medium-r-*-*-17-*-*-*-*-*-iso10646-1" to type FontStruct
xfd:  no font to display
Comment 7 Christopher Yeleighton 2013-09-19 19:02:02 UTC
{ xlsfonts -fn '-*-fifthleg-medium-r-*-*-17-*-*-*-*-*-iso10646-1'; }
-misc-fifthleg-medium-r-normal--17-123-100-100-p-0-iso10646-1
{ xlsfonts -o -fn '-*-fifthleg-medium-r-*-*-17-*-*-*-*-*-iso10646-1'; }
xlsfonts: pattern "-*-fifthleg-medium-r-*-*-17-*-*-*-*-*-iso10646-1" unmatched
Comment 8 Stefan Dirsch 2013-09-20 09:42:32 UTC
Hmm. Seems the font cannot be displayed via server side rendering. Using fontconfig/xft it works though.

  xfd -fa FifthLeg

Not sure, whether server side rendering doesn't support OTFs at all or whether it's specific to this font. Could be.
Comment 9 Petr Gajdos 2013-09-25 14:06:37 UTC
Jürgen, Thomas, fifth-leg-font is yours :-].
Comment 10 Petr Gajdos 2013-09-25 14:07:35 UTC
(In reply to comment #1)
> Did you run fonts-config afterwards as root and of course 'xset fp rehash' as
> logged in user? Unfortunately the former is required since someone had the
> glorious idea to get rid of SuSEconfig(.fonts). :-(

Every font should have %reconfigure_fonts_scriptlets macro, which should run fonts-config. fifth-leg-font do so, so additional run of fonts-config should not be needed. Or am I missing something?
Comment 11 Petr Gajdos 2013-09-25 14:15:09 UTC
(In reply to comment #0)
> The font is apparently available as a client font only.  The font should be
> reclassified into Publishing (hence Minor).

Why? FifthLeg is font, so it is in M17N:fonts. I am no problem to display it on my workstation.
Comment 12 Juergen Weigert 2013-09-25 14:35:19 UTC
(In reply to comment #9)
> Jürgen, Thomas, fifth-leg-font is yours :-].

Are there any special criteria for a font, to be suitable for server side rendering? I am not aware of any.
Comment 13 Petr Gajdos 2013-09-25 15:29:41 UTC
Hmm:

$ sudo zypper in google-exo-fonts
$ grep -c Exo fonts.dir
192
$ sudo rpm -e google-exo-fonts
$ grep -c Exo fonts.dir
0

But

$ sudo zypper in fifth-leg-font
$ grep -c Fifth fonts.dir
0
$ sudo mkfontscale
$ sudo mkfontdir
$ grep -c Fifth fonts.dir
4
Comment 14 Petr Gajdos 2013-09-25 15:31:27 UTC
To be complete

$ sudo rpm -e fifth-leg-font
$ grep -c Fifth fonts.dir
0
Comment 15 Petr Gajdos 2013-09-26 12:29:59 UTC
Issue described in comment 13 has following explanation.

fonts-config is checking whether freetype module is loaded by searching /etc/X11/xorg.conf for /\s*Load\s+"freetype"/. Then

      if ($extension =~ /otf/i && ! $freetype_module_used) {
        if ($VERBOSITY >= $VERBOSITY_DEBUG) {
          print ".otf won't work without freetype module,...
                 ...discarding $fonts_scale_entries{$xlfd} $xlfd\n";
        }
        delete $fonts_scale_entries{$xlfd};
      }

So question for Stefan: is checking for freetype module still relevant? Or is it safe to assume that freetype is always used? fonts-config checks for freetype and xtt but the latter is outdated, correct?
Comment 16 Petr Gajdos 2013-09-26 12:31:12 UTC
Assigning back to me as the problem described in comment 0 seems to be caused by fonts-config.
Comment 17 Stefan Dirsch 2013-09-26 13:10:43 UTC
There is no /etc/X11/xorg.conf any longer. Yes, it is safe to assume that freetype is always available. Seems it's now included by Xorg binary and no X module any longer. xtt is considered dead.
Comment 18 Petr Gajdos 2013-09-26 13:30:33 UTC
(In reply to comment #17)
> There is no /etc/X11/xorg.conf any longer. Yes, it is safe to assume that

Have noticed ;-).

> freetype is always available. Seems it's now included by Xorg binary and no X
> module any longer. xtt is considered dead.

seems fonts-config needs major rewrite.
Comment 19 Stefan Dirsch 2013-09-26 14:38:24 UTC
(In reply to comment #18)
> > freetype is always available. Seems it's now included by Xorg binary and no X
> > module any longer. xtt is considered dead.
> 
> seems fonts-config needs major rewrite.

It hasn't been touched since Mike Fabian left the company, right? Which is now about 4 1/2 years ago ...
Comment 20 Petr Gajdos 2013-09-26 15:08:24 UTC
(In reply to comment #19)
> It hasn't been touched since Mike Fabian left the company, right? Which is now
> about 4 1/2 years ago ...

Yes. It has been touched, but only in in very isolated portions of code.

Will see if I have enough knowledge for this task and in which time horizon it could be done.

This bug can be resolved for now by simple removal of condition from comment 15, though.
Comment 21 Petr Gajdos 2013-10-01 11:25:32 UTC
Did so, giving fonts-config high priority in my TODO list.

Christopher, this should resolve issue described in comment 0. Please file a new bug report for other issues described in this bug, if you want to.

Thanks for reporting!
Comment 22 Bernhard Wiedemann 2013-10-01 12:00:54 UTC
This is an autogenerated message for OBS integration:
This bug (840416) was mentioned in
https://build.opensuse.org/request/show/201591 Factory / fonts-config