#1 Use TTF built from source, and compress with zopflipng for smaller files
Merged 6 years ago by pwu. Opened 6 years ago by mavit.
rpms/ mavit/google-noto-emoji-fonts master  into  master

file modified
+2
@@ -1,3 +1,4 @@ 

+ /google-noto-emoji-fonts-*-*.*.src.rpm

  /noto-emoji-e7a7241.tar.gz

  /nototools-c1f2cff.tar.gz

  /noto-emoji-1c0ce22.tar.gz
@@ -12,3 +13,4 @@ 

  /nototools-feacefe.tar.gz

  /nototools-0c99dff.tar.gz

  /noto-emoji-411334c.tar.gz

+ /results_google-noto-emoji-fonts/

file modified
+12 -4
@@ -9,7 +9,7 @@ 

  

  Name:           %{fontname}-fonts

  Version:        20170928

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Google “Noto Emoji” Black-and-White emoji font

  

  # In noto-emoji-fonts source
@@ -36,7 +36,7 @@ 

  BuildRequires:  fontpackages-devel

  BuildRequires:  ImageMagick

  BuildRequires:  pngquant

- BuildRequires:  optipng

+ BuildRequires:  zopfli

  BuildRequires:  cairo-devel

  

  Requires:       fontpackages-filesystem
@@ -76,8 +76,12 @@ 

  

  %install

  install -m 0755 -d %{buildroot}%{_fontdir}

- install -m 0644 -p *Emoji.ttf %{buildroot}%{_fontdir}

- install -m 0644 -p fonts/*.ttf %{buildroot}%{_fontdir}

+ 

+ # Built by us from the supplied pngs:

+ install -m 0644 -p NotoColorEmoji.ttf %{buildroot}%{_fontdir}

+ 

+ # Pre-built, and included with the source:

+ install -m 0644 -p fonts/NotoEmoji-Regular.ttf %{buildroot}%{_fontdir}

  

  mkdir -p %{buildroot}%{_datadir}/appdata

  install -m 0644 -p %{SOURCE2} %{buildroot}%{_datadir}/appdata
@@ -95,6 +99,10 @@ 

  

  

  %changelog

+ * Wed Nov  8 2017 Peter Oliver <rpm@mavit.org.uk> - 20170928-2

+ - Prefer zopflipng to optipng, since it should yield smaller files.

+ - Use the font we built, rather than the one included with the source.

+ 

  * Thu Sep 28 2017 Mike FABIAN <mfabian@redhat.com> - 20170828-1

  - Update to upstream snapshot tarball

  - split black-and-white and color fonts into different sub-packages.

There are two changes, here.

A comment in the noto-emoji Makefile says:

zopflipng is better (about 5-10%) but much slower. it will be used if present.

I enabled that, but was surprised to find that the resulting RPM delivered exactly the same font. It turns out that, although we were assembling a ttf from the pngs provided, we were immediately overwriting this with the pre-built ttf also included with the source.

The resulting RPM is now 7091927 bytes, versus 7270251 before.

Pull-Request has been merged by pwu

6 years ago

Thanks for the patch! :)