[tor-commits] [builders/tor-browser-build] branch master updated: Bug 40529: Updated the Noto fonts

gitolite role git at cupani.torproject.org
Thu Jul 7 13:05:23 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch master
in repository builders/tor-browser-build.

The following commit(s) were added to refs/heads/master by this push:
     new c0db1d8  Bug 40529: Updated the Noto fonts
c0db1d8 is described below

commit c0db1d8981c3651699794aeb1bff3868d9c9df8f
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Fri Jun 17 11:48:55 2022 +0200

    Bug 40529: Updated the Noto fonts
    
    We were using an older version of the Noto fonts.
    Now we switched to a newever one (which has more hinted fonts, and
    possibly a wider Unicode support). Also, we bundle Noto Serif fonts,
    when available.
---
 projects/fonts/build            |  30 ++++--
 projects/fonts/config           | 219 +++++++++++++++++++++++++++-------------
 projects/fonts/fetch-noto-fonts |  29 ++++++
 3 files changed, 197 insertions(+), 81 deletions(-)

diff --git a/projects/fonts/build b/projects/fonts/build
index 14e2974..3734d72 100644
--- a/projects/fonts/build
+++ b/projects/fonts/build
@@ -2,22 +2,34 @@
 [% c("var/set_default_env") -%]
 distdir=/var/tmp/dist/fonts
 mkdir -p $distdir
-unzip -o 720e34851382ee3c1ef024d8dffb68ffbfb234c2.zip
+
 mv noto-fonts-* noto-fonts
-mkdir -p $distdir
-[% FOREACH fontfile = c("var/noto_fonts_hinted");
-     GET 'cp "noto-fonts/hinted/' _ fontfile _ '" $distdir' _ "\n";
-   END; %]
-[% FOREACH fontfile = c("var/noto_fonts_unhinted");
-     GET 'cp "noto-fonts/unhinted/' _ fontfile _ '" $distdir' _ "\n";
-   END; %]
+
+[% FOREACH fontfile = c("var/noto_fonts_common");
+    GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n";
+  END; %]
+
+[% IF c("var/linux") %]
+  [% FOREACH fontfile = c("var/noto_fonts_linux");
+      GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n";
+    END; %]
+[% END %]
+[% IF c("var/osx") %]
+  [% FOREACH fontfile = c("var/noto_fonts_mac");
+      GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n";
+    END; %]
+[% END %]
+[% IF c("var/windows") %]
+  [% FOREACH fontfile = c("var/noto_fonts_windows");
+      GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n";
+    END; %]
+[% END %]
 
 [% IF c("var/linux") || c("var/osx") %]
   unzip -o 2.0.0.zip -d STIX
   cp "STIX/stixfonts-2.0.0/archive/STIXv1.1.1/Fonts/STIX-Word/STIXMath-Regular.otf" $distdir/
 [% END %]
 [% IF c("var/linux") %]
-  cp NotoEmoji-Regular.ttf $distdir/
   cp {NotoSansJP-Regular.otf,NotoSansKR-Regular.otf,NotoSansSC-Regular.otf,NotoSansTC-Regular.otf} $distdir/
 [% END %]
 cd /var/tmp/dist
diff --git a/projects/fonts/config b/projects/fonts/config
index d708afd..ce66556 100644
--- a/projects/fonts/config
+++ b/projects/fonts/config
@@ -1,106 +1,181 @@
 # vim: filetype=yaml sw=2
-version: '1'
+version: '2'
 filename: "[% project %]-[% c('version') %]-[% c('var/build_id') %].tar.gz"
 var:
   container:
     use_container: 1
-  noto_fonts_hinted:
-    - Arimo-Regular.ttf
-    - Arimo-Bold.ttf
-    - Arimo-Italic.ttf
-    - Arimo-BoldItalic.ttf
-    - Cousine-Regular.ttf
-    - Tinos-Regular.ttf
-    - Tinos-Bold.ttf
-    - Tinos-Italic.ttf
-    - Tinos-BoldItalic.ttf
-    - NotoNaskhArabic-Regular.ttf
-    - NotoSansArmenian-Regular.ttf
+  noto_git_hash: 20bc5918912503bc1537a407a694738c33c048aa
+  # Use this way so that the script that downloads the fonts can access the
+  # lists of all the targets.
+  noto_fonts_common:
+    - NotoSansAdlam-Regular.ttf
+    - NotoSansBalinese-Regular.ttf
+    - NotoSansBamum-Regular.ttf
+    - NotoSansBassaVah-Regular.ttf
+    - NotoSansBatak-Regular.ttf
     - NotoSansBengali-Regular.ttf
+    - NotoSansBuginese-Regular.ttf
+    - NotoSansBuhid-Regular.ttf
+    - NotoSansCanadianAboriginal-Regular.ttf
+    - NotoSansChakma-Regular.ttf
+    - NotoSansCham-Regular.ttf
+    - NotoSansCherokee-Regular.ttf
+    - NotoSansCoptic-Regular.ttf
+    - NotoSansDeseret-Regular.ttf
     - NotoSansDevanagari-Regular.ttf
+    - NotoSansElbasan-Regular.ttf
     - NotoSansEthiopic-Regular.ttf
     - NotoSansGeorgian-Regular.ttf
+    - NotoSansGrantha-Regular.ttf
     - NotoSansGujarati-Regular.ttf
+    - NotoSansGunjalaGondi-Regular.ttf
     - NotoSansGurmukhi-Regular.ttf
-    - NotoSansHebrew-Regular.ttf
+    - NotoSansHanifiRohingya-Regular.ttf
+    - NotoSansHanunoo-Regular.ttf
     - NotoSansKannada-Regular.ttf
     - NotoSansKhmer-Regular.ttf
+    - NotoSansJavanese-Regular.ttf
+    - NotoSansKayahLi-Regular.ttf
+    - NotoSansKhojki-Regular.ttf
+    - NotoSansKhudawadi-Regular.ttf
     - NotoSansLao-Regular.ttf
+    - NotoSansLepcha-Regular.ttf
+    - NotoSansLimbu-Regular.ttf
+    - NotoSansLisu-Regular.ttf
+    - NotoSansMahajani-Regular.ttf
     - NotoSansMalayalam-Regular.ttf
+    - NotoSansMandaic-Regular.ttf
+    - NotoSansMasaramGondi-Regular.ttf
+    - NotoSansMedefaidrin-Regular.ttf
+    - NotoSansMeeteiMayek-Regular.ttf
+    - NotoSansMendeKikakui-Regular.ttf
+    - NotoSansMiao-Regular.ttf
+    - NotoSansModi-Regular.ttf
+    - NotoSansMongolian-Regular.ttf
+    - NotoSansMro-Regular.ttf
     - NotoSansMyanmar-Regular.ttf
+    - NotoSansMultani-Regular.ttf
+    - NotoSansNewa-Regular.ttf
+    - NotoSansNewTaiLue-Regular.ttf
+    - NotoSansNKo-Regular.ttf
+    - NotoSansOlChiki-Regular.ttf
     - NotoSansOriya-Regular.ttf
+    - NotoSansOsage-Regular.ttf
+    - NotoSansOsmanya-Regular.ttf
+    - NotoSansPahawhHmong-Regular.ttf
+    - NotoSansPauCinHau-Regular.ttf
+    - NotoSansRejang-Regular.ttf
+    - NotoSansRunic-Regular.ttf
+    - NotoSansSamaritan-Regular.ttf
+    - NotoSansSaurashtra-Regular.ttf
+    - NotoSansSharada-Regular.ttf
+    - NotoSansShavian-Regular.ttf
     - NotoSansSinhala-Regular.ttf
+    - NotoSansSoraSompeng-Regular.ttf
+    - NotoSansSoyombo-Regular.ttf
+    - NotoSansSundanese-Regular.ttf
+    - NotoSansSylotiNagri-Regular.ttf
+    - NotoSansSymbols2-Regular.ttf
+    - NotoSansSymbols-Regular.ttf
+    - NotoSansSyriac-Regular.ttf
+    - NotoSansTagalog-Regular.ttf
+    - NotoSansTagbanwa-Regular.ttf
+    - NotoSansTaiLe-Regular.ttf
+    - NotoSansTaiTham-Regular.ttf
+    - NotoSansTaiViet-Regular.ttf
+    - NotoSansTakri-Regular.ttf
     - NotoSansTamil-Regular.ttf
     - NotoSansTelugu-Regular.ttf
     - NotoSansThaana-Regular.ttf
-    - NotoSansThai-Regular.ttf
-    - NotoSansTibetan-Regular.ttf
-    - NotoSerifArmenian-Regular.ttf
+    - NotoSansTifinaghAdrar-Regular.ttf
+    - NotoSansTifinaghAgrawImazighen-Regular.ttf
+    - NotoSansTifinaghAhaggar-Regular.ttf
+    - NotoSansTifinaghAir-Regular.ttf
+    - NotoSansTifinaghAPT-Regular.ttf
+    - NotoSansTifinaghAzawagh-Regular.ttf
+    - NotoSansTifinaghGhat-Regular.ttf
+    - NotoSansTifinaghHawad-Regular.ttf
+    - NotoSansTifinagh-Regular.ttf
+    - NotoSansTifinaghRhissaIxa-Regular.ttf
+    - NotoSansTifinaghSIL-Regular.ttf
+    - NotoSansTifinaghTawellemmet-Regular.ttf
+    - NotoSansTirhuta-Regular.ttf
+    - NotoSansVai-Regular.ttf
+    - NotoSansWancho-Regular.ttf
+    - NotoSansWarangCiti-Regular.ttf
+    - NotoSansYi-Regular.ttf
+    - NotoSansZanabazarSquare-Regular.ttf
+    - NotoSerifBalinese-Regular.ttf
+    - NotoSerifBengali-Regular.ttf
+    - NotoSerifDevanagari-Regular.ttf
+    - NotoSerifDogra-Regular.ttf
+    - NotoSerifEthiopic-Regular.ttf
+    - NotoSerifGeorgian-Regular.ttf
+    - NotoSerifGrantha-Regular.ttf
+    - NotoSerifGujarati-Regular.ttf
+    - NotoSerifGurmukhi-Regular.ttf
+    - NotoSerifKannada-Regular.ttf
     - NotoSerifKhmer-Regular.ttf
+    - NotoSerifKhojki-Regular.ttf
     - NotoSerifLao-Regular.ttf
+    - NotoSerifMalayalam-Regular.ttf
+    - NotoSerifMyanmar-Regular.ttf
+    - NotoSerifNyiakengPuachueHmong-Regular.ttf
+    - NotoSerifSinhala-Regular.ttf
+    - NotoSerifTamil-Regular.ttf
+    - NotoSerifTelugu-Regular.ttf
+    - NotoSerifTibetan-Regular.ttf
+    - NotoSerifYezidi-Regular.ttf
+
+  noto_fonts_linux:
+    - Arimo-Regular.ttf
+    - Arimo-Bold.ttf
+    - Arimo-Italic.ttf
+    - Arimo-BoldItalic.ttf
+    - Cousine-Regular.ttf
+    - Tinos-Regular.ttf
+    - Tinos-Bold.ttf
+    - Tinos-Italic.ttf
+    - Tinos-BoldItalic.ttf
+    - NotoNaskhArabic-Regular.ttf
+    - NotoSansArmenian-Regular.ttf
+    - NotoSansHebrew-Regular.ttf
+    - NotoSansSymbols-Regular.ttf
+    - NotoSansSymbols2-Regular.ttf
+    - NotoSansThaana-Regular.ttf
+    - NotoSansThai-Regular.ttf
+    - NotoSerifArmenian-Regular.ttf
+    - NotoSerifHebrew-Regular.ttf
     - NotoSerifThai-Regular.ttf
-  noto_fonts_unhinted:
-    - NotoSansCanadianAboriginal-Regular.ttf
-    - NotoSansBuginese-Regular.ttf
-    - NotoSansCherokee-Regular.ttf
-    - NotoSansMongolian-Regular.ttf
-    - NotoSansYi-Regular.ttf
+  noto_fonts_mac:
+    - NotoSansArmenian-Regular.ttf
+    - NotoSansHebrew-Regular.ttf
+    - NotoSansThaana-Regular.ttf
+    - NotoSerifArmenian-Regular.ttf
+    - NotoSerifHebrew-Regular.ttf
 
-targets:
-  osx-x86_64:
-    var:
-      noto_fonts_hinted:
-        - NotoSansArmenian-Regular.ttf
-        - NotoSansBengali-Regular.ttf
-        - NotoSansDevanagari-Regular.ttf
-        - NotoSansEthiopic-Regular.ttf
-        - NotoSansGujarati-Regular.ttf
-        - NotoSansGurmukhi-Regular.ttf
-        - NotoSansKannada-Regular.ttf
-        - NotoSansKhmer-Regular.ttf
-        - NotoSansLao-Regular.ttf
-        - NotoSansMalayalam-Regular.ttf
-        - NotoSansMyanmar-Regular.ttf
-        - NotoSansOriya-Regular.ttf
-        - NotoSansSinhala-Regular.ttf
-        - NotoSansTamil-Regular.ttf
-        - NotoSansTelugu-Regular.ttf
-        - NotoSansThaana-Regular.ttf
-        - NotoSansTibetan-Regular.ttf
-      noto_fonts_unhinted:
-        - NotoSansCanadianAboriginal-Regular.ttf
-        - NotoSansBuginese-Regular.ttf
-        - NotoSansCherokee-Regular.ttf
-        - NotoSansMongolian-Regular.ttf
-        - NotoSansYi-Regular.ttf
-  windows:
-    var:
-      noto_fonts_hinted:
-        - NotoSansKhmer-Regular.ttf
-        - NotoSansLao-Regular.ttf
-        - NotoSansMyanmar-Regular.ttf
-      noto_fonts_unhinted:
-        - NotoSansBuginese-Regular.ttf
-        - NotoSansYi-Regular.ttf
+  noto_fonts_windows:
+    - NotoNaskhArabic-Regular.ttf
+    - NotoSans-Regular.ttf
+    - NotoSerif-Regular.ttf
 
 input_files:
   - project: container-image
-  - URL: https://github.com/googlefonts/noto-fonts/archive/720e34851382ee3c1ef024d8dffb68ffbfb234c2.zip
-    sha256sum: 26029b0b157e30ba063a759a1af859f849b7090162802a2cf57dfaad06849528
-  - URL: https://github.com/googlei18n/noto-emoji/raw/2f1ffdd6fbbd05d6f382138a3d3adcd89c5ce800/fonts/NotoEmoji-Regular.ttf
-    sha256sum: 415dc6290378574135b64c808dc640c1df7531973290c4970c51fdeb849cb0c5
-    enable: '[% c("var/linux") %]'
-  - URL: https://github.com/googlei18n/noto-cjk/raw/f36eda03dfa5582a6d49abbfb5c83d0209584158/NotoSansJP-Regular.otf
-    sha256sum: 3e8146c4ce0945f255cb9dbc12b392380af80bd117e0a60eae555c99c7e618da
+  - filename: 'noto-fonts-[% c("var/noto_git_hash") %]-[% c("version") %]'
+    name: noto-fonts
+    exec: '[% INCLUDE "fetch-noto-fonts" %]'
+  # Noto Sans CJK Version 2.004
+  - URL: https://github.com/googlefonts/noto-cjk/raw/523d033d6cb47f4a80c58a35753646f5c3608a78/Sans/SubsetOTF/JP/NotoSansJP-Regular.otf
+    sha256sum: dff723ba59d57d136764a04b9b2d03205544f7cd785a711442d6d2d085ac5073
     enable: '[% c("var/linux") %]'
-  - URL: https://github.com/googlei18n/noto-cjk/raw/f36eda03dfa5582a6d49abbfb5c83d0209584158/NotoSansKR-Regular.otf
-    sha256sum: b21817200abcb37a8ee865befce588d65babd1c35c2c4d32d3cd3f5b4780a7a3
+  - URL: https://github.com/googlefonts/noto-cjk/raw/523d033d6cb47f4a80c58a35753646f5c3608a78/Sans/SubsetOTF/KR/NotoSansKR-Regular.otf
+    sha256sum: 69975a0ac8472717870aefeab0a4d52739308d90856b9955313b2ad5e0148d68
     enable: '[% c("var/linux") %]'
-  - URL: https://github.com/googlei18n/noto-cjk/raw/f36eda03dfa5582a6d49abbfb5c83d0209584158/NotoSansSC-Regular.otf
-    sha256sum: 8c37936063c7c8ab747a939e13833894f9edc80dd41b98874ca8f3938a33c32f
+  - URL: https://github.com/googlefonts/noto-cjk/raw/523d033d6cb47f4a80c58a35753646f5c3608a78/Sans/SubsetOTF/SC/NotoSansSC-Regular.otf
+    sha256sum: faa6c9df652116dde789d351359f3d7e5d2285a2b2a1f04a2d7244df706d5ea9
     enable: '[% c("var/linux") %]'
-  - URL: https://github.com/googlei18n/noto-cjk/raw/f36eda03dfa5582a6d49abbfb5c83d0209584158/NotoSansTC-Regular.otf
-    sha256sum: e6b82f7d3dab605c428161124ceb5e169cde93de632d800297b167cdd88e7baa
+  - URL: https://github.com/googlefonts/noto-cjk/raw/523d033d6cb47f4a80c58a35753646f5c3608a78/Sans/SubsetOTF/TC/NotoSansTC-Regular.otf
+    sha256sum: 5bab0cb3c1cf89dde07c4a95a4054b195afbcfe784d69d75c340780712237537
     enable: '[% c("var/linux") %]'
   - URL: https://github.com/stipub/stixfonts/archive/2.0.0.zip
     sha256sum: 4327a16797dabebedce28a9075671730e22c7f74831b24b1fb91e27faec5a235
diff --git a/projects/fonts/fetch-noto-fonts b/projects/fonts/fetch-noto-fonts
new file mode 100644
index 0000000..4bfde7f
--- /dev/null
+++ b/projects/fonts/fetch-noto-fonts
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -e
+
+REPO_DIR="$(mktemp -d)"
+OUT_DIR="[% dest_dir %]/noto-fonts-[% c("var/noto_git_hash") %]-[% c("version") %]"
+
+pushd "$REPO_DIR"
+git init
+git remote add origin https://github.com/googlefonts/noto-fonts.git
+git fetch --depth 1 origin "[% c('var/noto_git_hash') %]"
+git checkout "[% c('var/noto_git_hash') %]"
+
+rm -rf "$OUT_DIR"
+mkdir "$OUT_DIR"
+[%
+  platforms = [c("var/noto_fonts_common"), c("var/noto_fonts_linux"), c("var/noto_fonts_mac"), c("var/noto_fonts_windows")];
+  FOREACH platform = platforms;
+    FOREACH fontfile = platform;
+      GET 'font=$(find hinted -name ' _ fontfile _ ' -print | head -1)' _ "\n";
+      # Do not use find -exec, because if the file does not exist, we have an
+      # error only in the following phases. In this way, we try to fail earlier.
+      GET 'cp -u $font "$OUT_DIR/"' _ "\n";
+    END;
+  END; %]
+
+popd
+rm -rf "$REPO_DIR"
+
+echo "Finished downloading the needed Noto fonts"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list