Bug 252360 - x11-fonts/google-fonts font duplication and impact
Summary: x11-fonts/google-fonts font duplication and impact
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitri Goutnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 20:57 UTC by Graham Perrin
Modified: 2021-01-09 19:43 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (dmgk)


Attachments
A log of the installation (2020-12-25) (4.44 KB, text/plain)
2021-01-02 20:57 UTC, Graham Perrin
no flags Details
666 duplicate fonts (381.12 KB, image/png)
2021-01-02 20:58 UTC, Graham Perrin
no flags Details
Attempting partial deduplication (400.54 KB, image/png)
2021-01-02 21:01 UTC, Graham Perrin
no flags Details
Screenshot of KCharSelect (241.40 KB, image/png)
2021-01-02 21:03 UTC, Graham Perrin
no flags Details
KCharSelect after removing the google-fonts package (847.62 KB, image/png)
2021-01-02 22:24 UTC, Graham Perrin
no flags Details
Noto Sans Symbols with google-fonts installed (184.83 KB, image/png)
2021-01-09 18:30 UTC, Dmitri Goutnik
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2021-01-02 20:57:00 UTC
Created attachment 221207 [details]
A log of the installation (2020-12-25)

I have not attempted to reproduce this, but it _appears_ that I have hundreds of duplicate fonts – many of them Google's – after a Christmas day installation of x11-fonts/google-fonts and some other font-related packages.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 20:58:02 UTC
Created attachment 221208 [details]
666 duplicate fonts

666. The Number of The Devil. Evil cackle.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 21:01:07 UTC
Created attachment 221209 [details]
Attempting partial deduplication

With a sudo run of System Settings (KDE Plasma 5) I attempted to deduplicate a batch of … if I recall correctly, a hundred or so. 

Numerous error dialogues appeared, as shown in this screenshot. I abandoned the attempt to deduplicate …
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 21:03:35 UTC
Created attachment 221210 [details]
Screenshot of KCharSelect

Maybe a symptom of the duplication. 

In the menu of bookmarks, most of the bookmarked characters are no longer legible. 

I know from memory that the uppermost menu item was a thumbs-up so I have no trouble with this one, but the more recently bookmarked characters (lower in the menu) are a mystery.
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 21:09:58 UTC
Maybe more symptoms of the duplication: 

<https://i.imgur.com/L81pj8B.png> peculiar appearance (note the lack of spacing between words) in a PDF rendered by Okular

<https://i.imgur.com/p4GPh8U.png> the result of using Calibre to produce an EPUB from the PDF. 

Context: 

* <https://old.reddit.com/r/freebsd/comments/kjw7a1/-/ghu9etw/>
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 22:24:14 UTC
Created attachment 221215 [details]
KCharSelect after removing the google-fonts package

Much better. 

Main window (array of Noto Sans): a few gaps, these might be normal. 

Global menu: I guess that this will not correct itself until after I sign out from KDE. 

The PDF mentioned in a previous comment still appear odd in Okular.
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2021-01-02 23:28:19 UTC
I reinstalled the package, signed out, signed in, the KCharSelect view of Noto was messed up again so I removed the package. 

Xorg.0.log includes: 

[ 94326.008] (**) FontPath set to:
        /usr/local/share/fonts/google-fonts/,
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/,
        catalogue:/usr/local/etc/X11/fontpath.d
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-01-09 18:21:04 UTC
A commit references this bug:

Author: dmgk
Date: Sat Jan  9 18:21:02 UTC 2021
New revision: 560882
URL: https://svnweb.freebsd.org/changeset/ports/560882

Log:
  x11-fonts/google-fonts: Update to 0.0.0.20210108

  - Add more dependencies on existing font packages to reduce font duplication
  - Do not install variable fonts

  PR:		252360
  Reported by:	Graham Perrin <grahamperrin@gmail.com>

Changes:
  head/x11-fonts/google-fonts/Makefile
  head/x11-fonts/google-fonts/distinfo
  head/x11-fonts/google-fonts/pkg-plist
Comment 8 Dmitri Goutnik freebsd_committer freebsd_triage 2021-01-09 18:30:18 UTC
Created attachment 221427 [details]
Noto Sans Symbols with google-fonts installed

Thanks for the report, 20210108 should reduce font duplication somewhat.

As to emojis/dingbats, you'll have to provide a little help to fontconfig, e.g.:

$ mkdir -p ~/.config/fontconfig

Then either append to an existing fonts.conf or create a new one:

$ cat > ~/.config/fontconfig/fonts.conf <<EOD
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <alias>
   <family>sans-serif</family>
   <prefer>
     <family>Noto Sans</family>
     <family>Noto Emoji</family>
     <family>Noto Color Emoji</family>
     <family>DejaVu Sans</family>
   </prefer>
 </alias>
</fontconfig>
EOD
Comment 9 Graham Perrin freebsd_committer freebsd_triage 2021-01-09 19:43:51 UTC
Thank you!

(In reply to Dmitri Goutnik from comment #8)

Maybe add a message to the package?