Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firefox pdf preview uses too big unreadable fonts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ville-v
n00b
n00b


Joined: 09 Apr 2013
Posts: 7

PostPosted: Thu Dec 18, 2014 6:29 am    Post subject: Firefox pdf preview uses too big unreadable fonts Reply with quote

When I open a pdf file in Firefox, many pdf show up with too big font that is unreadable. For example, this file looks like this:

http://i.imgur.com/lEU6Bb7.png
http://www.comets.fi/@Bin/202304/aikataulu_2015_kevat_15_12_2014.pdf

When I open the file at the default 100% zoom, the font is twice too big and does not fit the table. When I zoom 200%, the boxes scale but the text does not. I have to zoom 200% so that the pdf would look as intended. On another computer, the file looks fine. It seems to me that this problem mostly affects files with tables.

What should I do to fix this error? Thanks.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Thu Dec 18, 2014 7:58 am    Post subject: Reply with quote

Try to play with fonts settings, both in Firefox and in fontsconfig. My Firefox opened that document without any problem, so there should be a way to tune it. Though I agree, fonts support in Linux is a mess 8)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2657

PostPosted: Thu Dec 18, 2014 8:09 am    Post subject: Re: Firefox pdf preview uses too big unreadable fonts Reply with quote

ville-v wrote:
What should I do to fix this error? Thanks.
First of all, check if it also happens with a Firefox' clean profile. https://forums.gentoo.org/viewtopic-p-7652772.html#7652772
Back to top
View user's profile Send private message
ville-v
n00b
n00b


Joined: 09 Apr 2013
Posts: 7

PostPosted: Fri Dec 19, 2014 11:26 pm    Post subject: Re: Firefox pdf preview uses too big unreadable fonts Reply with quote

charles17 wrote:
ville-v wrote:
What should I do to fix this error? Thanks.
First of all, check if it also happens with a Firefox' clean profile. https://forums.gentoo.org/viewtopic-p-7652772.html#7652772
Yes, this also happens with a clean profile. Starting up, I get these errors. Are they related?

Code:
$ firefox -ProfileManager

(process:17168): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.


These files don't seem to have anything unusual.

/etc/fonts/conf.d/50-user.conf
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
   <!--
       Load per-user customization files where stored on XDG Base Directory
       specification compliant places. it should be usually:
         $HOME/.config/fontconfig/conf.d
         $HOME/.config/fontconfig/fonts.conf
   -->
   <include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
   <include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
   <!-- the following elements will be removed in the future -->
   <include ignore_missing="yes" deprecated="yes">~/.fonts.conf.d</include>
   <include ignore_missing="yes" deprecated="yes">~/.fonts.conf</include>
</fontconfig>


/etc/fonts/conf.d/41-ttf-arphic-ukai.conf
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
  Sans-serif faces
 -->
   <alias>
      <family>AR PL ZenKai Uni</family>
      <family>AR PL ZenKai Uni MBE</family>
      <family>AR PL UKai CN</family>
      <family>AR PL UKai HK</family>
      <family>AR PL UKai TW</family>
      <family>AR PL UKai TW MBE</family>
      <default><family>sans-serif</family></default>
   </alias>
</fontconfig>
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2657

PostPosted: Sat Dec 20, 2014 9:05 am    Post subject: Re: Firefox pdf preview uses too big unreadable fonts Reply with quote

ville-v wrote:
Yes, this also happens with a clean profile. Starting up, I get these errors. Are they related?

Code:
$ firefox -ProfileManager

(process:17168): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
The "GLib-CRITICAL" seems to be normal, there were discussions in the past already. And that's what I always get when starting firefox from command line. But I've never had those Fontconfig warning messages.
Back to top
View user's profile Send private message
ville-v
n00b
n00b


Joined: 09 Apr 2013
Posts: 7

PostPosted: Mon Dec 22, 2014 11:01 am    Post subject: Reply with quote

I updated Firefox to 31.3.0 today and it solved this. No idea why.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Tue Dec 23, 2014 7:40 am    Post subject: Re: Firefox pdf preview uses too big unreadable fonts Reply with quote

ville-v wrote:
Starting up, I get these errors. Are they related?

Code:
$ firefox -ProfileManager

(process:17168): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/41-ttf-arphic-ukai.conf", line 16: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.


/etc/fonts/conf.d/41-ttf-arphic-ukai.conf
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!--
  Sans-serif faces
 -->
   <alias>
      <family>AR PL ZenKai Uni</family>
      <family>AR PL ZenKai Uni MBE</family>
      <family>AR PL UKai CN</family>
      <family>AR PL UKai HK</family>
      <family>AR PL UKai TW</family>
      <family>AR PL UKai TW MBE</family>
      <default><family>sans-serif</family></default>
   </alias>
</fontconfig>


The error indicates, that newer version of fontconfig does not support multiple <family> entries within <alias>. So the 41-ttf-arphic-ukai.conf is essentially broken. Most likely it is harmless. I guess you can even deactivate this file using eselect fontconfig. Alternatively you can try and modify it to be something like
Code:

   <alias>
      <family>AR PL ZenKai Uni</family>
                <default><family>sans-serif</family></default>
        </alias>
        <alias>
      <family>AR PL ZenKai Uni MBE</family>
      <default><family>sans-serif</family></default>
        </alias>
        <alias>
      <family>AR PL UKai CN</family>
      <default><family>sans-serif</family></default>
        </alias>
        <alias>
      <family>AR PL UKai HK</family>
      <default><family>sans-serif</family></default>
        </alias>
        <alias>
      <family>AR PL UKai TW</family>
      <default><family>sans-serif</family></default>
        </alias>
        <alias>
      <family>AR PL UKai TW MBE</family>
      <default><family>sans-serif</family></default>
   </alias>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum