jumpy-lion 1.0.0-beta.0 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/fonts/macos-bundle/41-macos-remaining.conf +157 -0
- package/browser/fonts/macos-bundle/build-metric-fonts.py +1010 -0
- package/browser/fonts/macos-bundle/generated/AmericanTypewriter-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AmericanTypewriter-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AndaleMono-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AndaleMono-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AndaleMono-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AndaleMono-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AppleChancery-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AppleChancery-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AppleChancery-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AppleChancery-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Arial-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Arial-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Arial-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Arial-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialBlack-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialBlack-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialBlack-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialBlack-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialNarrow-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialNarrow-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialNarrow-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ArialNarrow-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Avenir-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Avenir-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Avenir-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Avenir-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNext-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNext-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNext-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNext-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/AvenirNextCondensed-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Baskerville-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Baskerville-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Baskerville-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Baskerville-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BigCaslon-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BigCaslon-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BigCaslon-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BigCaslon-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BlinkMacSystemFont-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Oldstyle-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Bodoni72Smallcaps-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BradleyHand-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/BrushScriptMT-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkboard-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkboard-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkboard-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkboard-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ChalkboardSE-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ChalkboardSE-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ChalkboardSE-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ChalkboardSE-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkduster-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkduster-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkduster-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Chalkduster-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Charter-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Charter-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Charter-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Charter-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Cochin-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Cochin-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Cochin-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Cochin-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ComicSansMS-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ComicSansMS-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ComicSansMS-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/ComicSansMS-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Copperplate-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Copperplate-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Courier-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Courier-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Courier-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Courier-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/CourierNew-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Didot-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Didot-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Didot-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Didot-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Futura-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Futura-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Futura-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Futura-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Geneva-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Georgia-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Georgia-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Georgia-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Georgia-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/GillSans-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/GillSans-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/GillSans-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/GillSans-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Helvetica-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Helvetica-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Helvetica-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Helvetica-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HelveticaNeue-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HelveticaNeue-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HelveticaNeue-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HelveticaNeue-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Herculanum-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Herculanum-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Herculanum-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Herculanum-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HoeflerText-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HoeflerText-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HoeflerText-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/HoeflerText-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Impact-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Impact-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Impact-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Impact-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/LucidaGrande-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/LucidaGrande-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/MarkerFelt-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/MarkerFelt-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/MarkerFelt-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/MarkerFelt-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Menlo-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Monaco-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Monaco-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Monaco-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Monaco-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Noteworthy-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Noteworthy-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Optima-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Optima-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Optima-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Optima-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Palatino-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Palatino-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Palatino-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Palatino-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Papyrus-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Papyrus-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Papyrus-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Papyrus-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/PartyLET-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/PartyLET-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/PartyLET-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/PartyLET-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Phosphate-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/README.md +132 -0
- package/browser/fonts/macos-bundle/generated/Rockwell-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Rockwell-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Rockwell-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Rockwell-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SavoyeLET-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SavoyeLET-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SavoyeLET-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SavoyeLET-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Seravek-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Seravek-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Seravek-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Seravek-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SignPainter-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SignPainter-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Skia-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Skia-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Skia-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Skia-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SnellRoundhand-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/SnellRoundhand-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Tahoma-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Tahoma-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Times-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Times-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Times-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Times-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TimesNewRoman-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TimesNewRoman-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TimesNewRoman-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TimesNewRoman-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Trattatello-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TrebuchetMS-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TrebuchetMS-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TrebuchetMS-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/TrebuchetMS-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Verdana-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Verdana-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Verdana-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Verdana-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Webdings-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Webdings-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Webdings-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Webdings-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Zapfino-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Zapfino-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Zapfino-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/Zapfino-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/manifest.json +2928 -0
- package/browser/fonts/macos-bundle/generated/systemui-Bold.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/systemui-BoldItalic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/systemui-Italic.ttf +0 -0
- package/browser/fonts/macos-bundle/generated/systemui-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/install.sh +66 -13
- package/browser/fonts/macos-bundle/vendor/README.md +30 -0
- package/browser/fonts/macos-bundle/vendor/anton/Anton-Regular.ttf +0 -0
- package/browser/fonts/macos-bundle/vendor/anton/OFL.txt +93 -0
- package/browser/fonts/macos-bundle/vendor/gelasio/Gelasio-Italic-VariableFont_wght.ttf +0 -0
- package/browser/fonts/macos-bundle/vendor/gelasio/Gelasio-VariableFont_wght.ttf +0 -0
- package/browser/fonts/macos-bundle/vendor/gelasio/OFL.txt +93 -0
- package/browser/fonts/macos-bundle/verify-metric-fonts.py +171 -0
- package/dist/browser-plugin.d.ts.map +1 -1
- package/dist/browser-plugin.js +39 -10
- package/dist/browser-plugin.js.map +1 -1
- package/dist/browser-process/anti-detect-config.d.ts +18 -3
- package/dist/browser-process/anti-detect-config.d.ts.map +1 -1
- package/dist/browser-process/anti-detect-config.js +103 -8
- package/dist/browser-process/anti-detect-config.js.map +1 -1
- package/dist/browser-process/browser.d.ts.map +1 -1
- package/dist/browser-process/browser.js +67 -2
- package/dist/browser-process/browser.js.map +1 -1
- package/dist/browser-process/fingerprint-config.d.ts.map +1 -1
- package/dist/browser-process/fingerprint-config.js +44 -1
- package/dist/browser-process/fingerprint-config.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +18 -18
- package/dist/fingerprinting/hardware-realism.d.ts +0 -9
- package/dist/fingerprinting/hardware-realism.d.ts.map +1 -1
- package/dist/fingerprinting/hardware-realism.js +21 -22
- package/dist/fingerprinting/hardware-realism.js.map +1 -1
- package/dist/fingerprinting/non-apify-fingerprint-generator.js +11 -11
- package/dist/fingerprinting/non-apify-fingerprint-generator.js.map +1 -1
- package/dist/fingerprinting/non-apify-profiles.json +1 -1
- package/dist/page.d.ts +5 -0
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +40 -2
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/browser/fonts/macos-bundle/40-macos-aliases.conf +0 -515
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -7,15 +7,21 @@
|
|
|
7
7
|
# Usage: bash install.sh [--no-cache]
|
|
8
8
|
#
|
|
9
9
|
# What it does:
|
|
10
|
-
# 1. apt-get installs free-licensed font packages
|
|
11
|
-
#
|
|
12
|
-
# 2.
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
10
|
+
# 1. apt-get installs the free-licensed font packages the generated faces are
|
|
11
|
+
# built from, plus the vendored ones apt cannot supply.
|
|
12
|
+
# 2. Installs generated/*.ttf — one real font file per macOS family, named as
|
|
13
|
+
# that family and carrying its own per-character advances (see
|
|
14
|
+
# build-metric-fonts.py). These replace most of what the alias file used to
|
|
15
|
+
# do, and they are why families no longer collapse onto shared clones.
|
|
16
|
+
# 3. Copies 41-macos-remaining.conf into /etc/fonts/conf.d/ for what a Latin
|
|
17
|
+
# donor cannot stand in for: the CJK/symbol/emoji faces and the generics.
|
|
18
|
+
# 4. Runs fc-cache to rebuild the system font cache so Skia (Chromium's
|
|
19
|
+
# font subsystem) sees everything immediately.
|
|
16
20
|
#
|
|
17
|
-
# Verify post-install with: fc-match
|
|
18
|
-
#
|
|
21
|
+
# Verify post-install with: fc-match Copperplate → expect Copperplate itself,
|
|
22
|
+
# not Liberation Sans. A macOS family that answers with a clone name means its
|
|
23
|
+
# generated face is missing and it has fallen back to the old shared-clone
|
|
24
|
+
# behaviour, where 54 families measured as 19 distinct faces.
|
|
19
25
|
|
|
20
26
|
set -euo pipefail
|
|
21
27
|
|
|
@@ -41,6 +47,14 @@ fi
|
|
|
41
47
|
FONT_PACKAGES=(
|
|
42
48
|
fonts-texgyre # TeX Gyre Heros (Helvetica), Pagella (Palatino), Bonum (Bookman)
|
|
43
49
|
fonts-croscore # Arimo (Arial), Tinos (Times), Cousine (Courier) — Apache 2.0
|
|
50
|
+
fonts-crosextra-carlito # Carlito (Calibri) — the narrow sans; measured 247.37
|
|
51
|
+
# against Gill Sans's 245.89, where Arimo was 17.8 off
|
|
52
|
+
fonts-crosextra-caladea # Caladea (Cambria) — stands in for Apple Chancery at
|
|
53
|
+
# 246.90 against 250.45. Its job is as much to be a
|
|
54
|
+
# DIFFERENT file from the serif clone: Apple Chancery
|
|
55
|
+
# is Chrome's default CURSIVE family on macOS, so
|
|
56
|
+
# pointing it at Tinos made the cursive generic
|
|
57
|
+
# measure identically to serif, which no Mac does
|
|
44
58
|
fonts-inter # Inter — SF Pro look-alike (OFL)
|
|
45
59
|
fonts-jetbrains-mono # JetBrains Mono — SF Mono replacement (Apache 2.0)
|
|
46
60
|
fonts-urw-base35 # Nimbus Sans/Roman/Mono PS, P052, URW Gothic, URW Bookman
|
|
@@ -56,14 +70,53 @@ FONT_PACKAGES=(
|
|
|
56
70
|
echo "[macos-bundle] Installing $((${#FONT_PACKAGES[@]})) font packages via apt-get…"
|
|
57
71
|
export DEBIAN_FRONTEND=noninteractive
|
|
58
72
|
apt-get update -qq
|
|
59
|
-
|
|
73
|
+
# One package at a time, tolerating misses. The list targets Ubuntu, and a few of
|
|
74
|
+
# these names do not exist on Debian trixie - where a single unknown package
|
|
75
|
+
# fails the whole apt invocation and takes the install with it. A miss is
|
|
76
|
+
# survivable now that the generated faces in generated/ carry the metrics: the
|
|
77
|
+
# apt packages are donors for the GENERATOR, not the runtime resolution path.
|
|
78
|
+
for pkg in "${FONT_PACKAGES[@]}"; do
|
|
79
|
+
apt-get install -y --no-install-recommends "$pkg" \
|
|
80
|
+
|| echo "[macos-bundle] skipped unavailable package: $pkg"
|
|
81
|
+
done
|
|
60
82
|
|
|
61
83
|
# Drop the alias config into fontconfig's per-system conf.d. The "40-" prefix
|
|
62
84
|
# places these aliases AFTER built-in family resolutions (10-/30-) but BEFORE
|
|
63
85
|
# user customizations (90-).
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
# Fonts that apt cannot supply: Georgia's only free metric clone (Gelasio) and
|
|
87
|
+
# Impact's usual stand-in (Anton). Neither is packaged in Debian/Ubuntu, so both
|
|
88
|
+
# ship in vendor/ - see vendor/README.md.
|
|
89
|
+
# Installed before the alias file so fc-cache below sees it in one pass.
|
|
90
|
+
VENDOR_DIR="$SCRIPT_DIR/vendor"
|
|
91
|
+
if [[ -d "$VENDOR_DIR" ]]; then
|
|
92
|
+
echo "[macos-bundle] Installing vendored fonts → /usr/local/share/fonts/macos-bundle/"
|
|
93
|
+
install -d /usr/local/share/fonts/macos-bundle
|
|
94
|
+
find "$VENDOR_DIR" -type f \( -name '*.ttf' -o -name '*.otf' \) \
|
|
95
|
+
-exec install -m 0644 {} /usr/local/share/fonts/macos-bundle/ \;
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# The generated per-family faces. One file per macOS family, named as that
|
|
99
|
+
# family, with that family's own advances written into hmtx. They must land in a
|
|
100
|
+
# directory fontconfig scans and BEFORE the cache is rebuilt below.
|
|
101
|
+
GENERATED_DIR="$SCRIPT_DIR/generated"
|
|
102
|
+
if [[ -d "$GENERATED_DIR" ]]; then
|
|
103
|
+
count=$(find "$GENERATED_DIR" -name '*.ttf' | wc -l | tr -d ' ')
|
|
104
|
+
echo "[macos-bundle] Installing $count generated macOS faces → /usr/local/share/fonts/macos-metrics/"
|
|
105
|
+
install -d /usr/local/share/fonts/macos-metrics
|
|
106
|
+
find "$GENERATED_DIR" -type f -name '*.ttf' \
|
|
107
|
+
-exec install -m 0644 {} /usr/local/share/fonts/macos-metrics/ \;
|
|
108
|
+
else
|
|
109
|
+
echo "[macos-bundle] WARNING: generated/ is missing - macOS families will fall back to shared clones." >&2
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# The old 40-macos-aliases.conf is removed rather than left in place: its
|
|
113
|
+
# <match target="pattern"> rewrites are authoritative, so a stale copy would
|
|
114
|
+
# redirect every generated family straight back to the shared clone it replaced.
|
|
115
|
+
rm -f /etc/fonts/conf.d/40-macos-aliases.conf
|
|
116
|
+
|
|
117
|
+
DEST_CONF="/etc/fonts/conf.d/41-macos-remaining.conf"
|
|
118
|
+
echo "[macos-bundle] Installing remaining fontconfig aliases → $DEST_CONF"
|
|
119
|
+
install -m 0644 "$SCRIPT_DIR/41-macos-remaining.conf" "$DEST_CONF"
|
|
67
120
|
|
|
68
121
|
if [[ "$SKIP_CACHE" -eq 0 ]]; then
|
|
69
122
|
echo "[macos-bundle] Rebuilding system font cache…"
|
|
@@ -75,7 +128,7 @@ fi
|
|
|
75
128
|
# Self-check: pick a few high-leverage aliases and confirm the resolution
|
|
76
129
|
# returns the bundled clone, not a Linux substitute.
|
|
77
130
|
echo "[macos-bundle] Verification:"
|
|
78
|
-
for family in "Helvetica" "
|
|
131
|
+
for family in "Helvetica" "Times" "Georgia" "Palatino" "Verdana" "Copperplate" "Optima" "Zapfino" "Monaco"; do
|
|
79
132
|
resolved="$(fc-match "$family" 2>/dev/null || echo 'fc-match unavailable')"
|
|
80
133
|
echo " $family → $resolved"
|
|
81
134
|
done
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Vendored fonts
|
|
2
|
+
|
|
3
|
+
Font files that are **not** packaged in Debian/Ubuntu and therefore cannot come
|
|
4
|
+
from `apt-get` like the rest of the bundle.
|
|
5
|
+
They are committed here rather than downloaded by `install.sh` so an image build
|
|
6
|
+
stays reproducible and works without network access to a third-party host.
|
|
7
|
+
|
|
8
|
+
## gelasio
|
|
9
|
+
|
|
10
|
+
Metric-compatible clone of **Georgia**, needed because Georgia is on macOS (and
|
|
11
|
+
on the binary's canvas font allowlist for the `apple_metal` family) while no
|
|
12
|
+
Debian package clones it.
|
|
13
|
+
Without it, a page asking for Georgia fell through to the fontconfig serif
|
|
14
|
+
default and measured 249.85px where a real Mac measures 272.31px for the same
|
|
15
|
+
string - a 22px, trivially detectable gap on one of the most commonly requested
|
|
16
|
+
web fonts.
|
|
17
|
+
|
|
18
|
+
| file | sha256 |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `Gelasio-VariableFont_wght.ttf` | `4daecea457258c9ebeb8bc99ed3fd24353618bfad3ea4b93fa0b5d0468fc04e4` |
|
|
21
|
+
| `Gelasio-Italic-VariableFont_wght.ttf` | `52559e845a4d33514e5f93bb9ae7dbeae1894a53f2c565a15f18af40cd337c09` |
|
|
22
|
+
|
|
23
|
+
Upstream: <https://github.com/SorkinType/Gelasio>, redistributed via
|
|
24
|
+
[google/fonts `ofl/gelasio`](https://github.com/google/fonts/tree/main/ofl/gelasio).
|
|
25
|
+
Licence: SIL Open Font License 1.1 - see `gelasio/OFL.txt`.
|
|
26
|
+
|
|
27
|
+
To refresh, re-download the same two files from google/fonts, update the hashes
|
|
28
|
+
above, and re-run the alias verification
|
|
29
|
+
(`test/docker-linux/font-survey.mjs` + `font-match.mjs`) - a new upstream release
|
|
30
|
+
can change the advance width, which is the whole reason this file is here.
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The Anton Project Authors (https://github.com/googlefonts/AntonFont.git)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Gelasio Project Authors (https://github.com/SorkinType/Gelasio)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check the generated faces against the macOS capture they were built from.
|
|
3
|
+
|
|
4
|
+
Reads the font files directly, so it verifies the generator without a browser,
|
|
5
|
+
a container launch or a fontconfig lookup in the way. Run it after regenerating,
|
|
6
|
+
and in CI if the fonts ever move into one.
|
|
7
|
+
|
|
8
|
+
python3 verify-metric-fonts.py \
|
|
9
|
+
--advances char-advances-macos-chrome151.json \
|
|
10
|
+
--generated generated/
|
|
11
|
+
|
|
12
|
+
Exit status is non-zero if any face is off by more than the tolerance, with no
|
|
13
|
+
exceptions: the generator screens donors so that every captured character has
|
|
14
|
+
its own glyph and can therefore hold its own advance. That screen exists because
|
|
15
|
+
21 of the measured macOS faces give U+00A0 a different advance from U+0020, and
|
|
16
|
+
a donor that maps both to one glyph drops the difference silently.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import argparse
|
|
20
|
+
import json
|
|
21
|
+
import os
|
|
22
|
+
import sys
|
|
23
|
+
|
|
24
|
+
from fontTools.pens.boundsPen import BoundsPen
|
|
25
|
+
from fontTools.ttLib import TTFont
|
|
26
|
+
|
|
27
|
+
# 0.5% is below what a measureText() comparison can resolve at the sizes pages
|
|
28
|
+
# use; the floor is the rounding of each advance to integer font units.
|
|
29
|
+
TOLERANCE = 0.005
|
|
30
|
+
|
|
31
|
+
# The ink box gets its own, looser floor, and the reason is arithmetic rather
|
|
32
|
+
# than indulgence. An advance error is measured against the advance, which is
|
|
33
|
+
# most of an em; a box edge is measured against the SPAN of that box, and a
|
|
34
|
+
# period's span is a few percent of an em - so the same half-unit of rounding
|
|
35
|
+
# that is 0.02% on an advance is 0.4% on a full stop. Measured across the
|
|
36
|
+
# generated bundle the median is 0.02% and the worst case is exactly that: the
|
|
37
|
+
# period's xMax.
|
|
38
|
+
INK_TOLERANCE = 0.01
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def main():
|
|
42
|
+
parser = argparse.ArgumentParser()
|
|
43
|
+
parser.add_argument("--advances", required=True)
|
|
44
|
+
parser.add_argument("--generated", required=True)
|
|
45
|
+
parser.add_argument("--inkbox", default="",
|
|
46
|
+
help="per-character ink box capture; when given, every "
|
|
47
|
+
"glyph's bounding box is checked as well as its advance")
|
|
48
|
+
args = parser.parse_args()
|
|
49
|
+
|
|
50
|
+
with open(args.advances, encoding="utf-8") as handle:
|
|
51
|
+
advances = json.load(handle)["advances"]
|
|
52
|
+
ink_capture = {}
|
|
53
|
+
if args.inkbox:
|
|
54
|
+
with open(args.inkbox, encoding="utf-8") as handle:
|
|
55
|
+
payload = json.load(handle)
|
|
56
|
+
if payload.get("fields") != ["width", "left", "right", "ascent", "descent"]:
|
|
57
|
+
sys.exit(f"--inkbox field order is {payload.get('fields')}, expected "
|
|
58
|
+
"['width', 'left', 'right', 'ascent', 'descent']")
|
|
59
|
+
ink_capture = payload["metrics"]
|
|
60
|
+
with open(os.path.join(args.generated, "manifest.json"), encoding="utf-8") as handle:
|
|
61
|
+
manifest = json.load(handle)
|
|
62
|
+
|
|
63
|
+
checked = 0
|
|
64
|
+
worst_overall = 0.0
|
|
65
|
+
worst_ink = 0.0
|
|
66
|
+
worst_ink_where = ""
|
|
67
|
+
ink_failures = []
|
|
68
|
+
unexpressible = []
|
|
69
|
+
failures = []
|
|
70
|
+
for key, info in sorted(manifest.items()):
|
|
71
|
+
family, style = key.rsplit(" ", 1)
|
|
72
|
+
# The system face is captured under the name a page can reach, and built
|
|
73
|
+
# under the name Blink resolves system-ui to.
|
|
74
|
+
source = "system-ui" if family == "BlinkMacSystemFont" else family
|
|
75
|
+
# The capture keys a style exactly as CSS spells it. Mapping every
|
|
76
|
+
# non-regular style to "|bold" compared each italic face against the
|
|
77
|
+
# BOLD advances and reported 60 false failures.
|
|
78
|
+
suffix = {"regular": "", "bold": "|bold", "italic": "|italic",
|
|
79
|
+
"bolditalic": "|bold italic"}.get(style)
|
|
80
|
+
if suffix is None:
|
|
81
|
+
print(f" ERROR: {key} - unknown style {style!r}")
|
|
82
|
+
failures.append(key)
|
|
83
|
+
continue
|
|
84
|
+
row = advances.get(f"{source}{suffix}")
|
|
85
|
+
if not row or row.get("unset"):
|
|
86
|
+
continue
|
|
87
|
+
|
|
88
|
+
font = TTFont(os.path.join(args.generated, info["file"]), lazy=True)
|
|
89
|
+
upem = font["head"].unitsPerEm
|
|
90
|
+
cmap = font.getBestCmap()
|
|
91
|
+
hmtx = font["hmtx"]
|
|
92
|
+
|
|
93
|
+
# Ink boxes, read back from the file the same way a rasteriser reads
|
|
94
|
+
# them: true bounds including curve extrema, so the check does not pass
|
|
95
|
+
# on a control-point box that overstates every curved glyph.
|
|
96
|
+
ink_row = ink_capture.get(f"{source}{suffix}") if ink_capture else None
|
|
97
|
+
if ink_row and not ink_row.get("unset"):
|
|
98
|
+
glyph_set = font.getGlyphSet()
|
|
99
|
+
ink_off = []
|
|
100
|
+
for codepoint, box in ink_row.items():
|
|
101
|
+
glyph = cmap.get(int(codepoint))
|
|
102
|
+
if glyph is None or not isinstance(box, list) or len(box) != 5:
|
|
103
|
+
continue
|
|
104
|
+
_advance, left, right, ascent, descent = box
|
|
105
|
+
want = (-left * upem, -descent * upem, right * upem, ascent * upem)
|
|
106
|
+
span = max(want[2] - want[0], want[3] - want[1])
|
|
107
|
+
if span <= 0:
|
|
108
|
+
continue # blank on the Mac; the generator clears these
|
|
109
|
+
pen = BoundsPen(glyph_set)
|
|
110
|
+
glyph_set[glyph].draw(pen)
|
|
111
|
+
if pen.bounds is None:
|
|
112
|
+
# The Mac paints something here and the donor has no outline
|
|
113
|
+
# for it at all - Webdings' U+00A0 is the whole population of
|
|
114
|
+
# this case. No transform can invent ink, so regenerating will
|
|
115
|
+
# never clear it: counted and printed, but not a failure,
|
|
116
|
+
# because a gate that can never go green stops being read.
|
|
117
|
+
unexpressible.append(f"{key} U+{int(codepoint):04X}")
|
|
118
|
+
continue
|
|
119
|
+
for axis in range(4):
|
|
120
|
+
error = abs(pen.bounds[axis] - want[axis]) / span
|
|
121
|
+
if error > worst_ink:
|
|
122
|
+
worst_ink = error
|
|
123
|
+
worst_ink_where = f"{key} U+{int(codepoint):04X} axis {axis}"
|
|
124
|
+
if error > INK_TOLERANCE:
|
|
125
|
+
ink_off.append((int(codepoint), axis, error))
|
|
126
|
+
if ink_off:
|
|
127
|
+
ink_failures.append(key)
|
|
128
|
+
detail = ", ".join(f"U+{cp:04X} axis {ax} off {err * 100:.2f}%"
|
|
129
|
+
for cp, ax, err in ink_off[:4])
|
|
130
|
+
print(f" ERROR: {key} - {len(ink_off)} ink box edge(s): {detail}")
|
|
131
|
+
|
|
132
|
+
off = []
|
|
133
|
+
for codepoint, want in row.items():
|
|
134
|
+
glyph = cmap.get(int(codepoint))
|
|
135
|
+
if glyph is None or want <= 0:
|
|
136
|
+
continue
|
|
137
|
+
got = hmtx[glyph][0] / upem
|
|
138
|
+
error = abs(got - want) / want
|
|
139
|
+
worst_overall = max(worst_overall, error)
|
|
140
|
+
if error > TOLERANCE:
|
|
141
|
+
off.append((int(codepoint), want, got, error))
|
|
142
|
+
font.close()
|
|
143
|
+
checked += 1
|
|
144
|
+
|
|
145
|
+
if off:
|
|
146
|
+
# There is no allowance any more. Donors are screened so that every
|
|
147
|
+
# captured character has its own glyph and can hold its own advance,
|
|
148
|
+
# so a miss here is a defect rather than a known limitation.
|
|
149
|
+
failures.append(key)
|
|
150
|
+
detail = ", ".join(f"U+{cp:04X} want {w:.4f} got {g:.4f}" for cp, w, g, _ in off[:4])
|
|
151
|
+
print(f" ERROR: {key} - {len(off)} codepoint(s): {detail}")
|
|
152
|
+
|
|
153
|
+
print(f"checked {checked} faces; worst per-character advance error {worst_overall * 100:.3f}%")
|
|
154
|
+
if ink_capture:
|
|
155
|
+
print(f"worst ink box edge error {worst_ink * 100:.3f}% ({worst_ink_where})")
|
|
156
|
+
if unexpressible:
|
|
157
|
+
print(f"{len(unexpressible)} glyph(s) the Mac paints and the donor cannot: "
|
|
158
|
+
+ ", ".join(unexpressible[:6]))
|
|
159
|
+
if failures:
|
|
160
|
+
print(f"FAIL: {len(failures)} face(s) off by more than {TOLERANCE * 100:.1f}%")
|
|
161
|
+
elif ink_failures:
|
|
162
|
+
print(f"FAIL: {len(ink_failures)} face(s) with ink box edges off by more "
|
|
163
|
+
f"than {INK_TOLERANCE * 100:.1f}%")
|
|
164
|
+
else:
|
|
165
|
+
print(f"PASS: every advance within {TOLERANCE * 100:.1f}%"
|
|
166
|
+
+ (f" and every ink box edge within {INK_TOLERANCE * 100:.1f}%" if ink_capture else ""))
|
|
167
|
+
sys.exit(1 if failures or ink_failures else 0)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
if __name__ == "__main__":
|
|
171
|
+
main()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-plugin.d.ts","sourceRoot":"","sources":["../src/browser-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAO,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAI3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAK7H,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAI3E,oFAAoF;AACpF,MAAM,WAAW,YAAa,SAAQ,MAAM;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACZ,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CAC7D;AAED,KAAK,OAAO,GAAG,WAAW,CAAC;AAC3B,KAAK,YAAY,GAAG,YAAY,CAAC;AACjC,UAAU,cAAc;CAAI;AAE5B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IAClE,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,MAAM,EAAE,OAAO,CAAC;KACnB,CAAC;IACF;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC;AAYD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,aAAa,CACvD,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,aAAa,CAChB;IACG;;;;;OAKG;gBACS,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAI3E;;;;;;OAMG;IACH,OAAO,CAAC,aAAa,CAAwC;IAE7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAA+C;IAE1F;OACG;cACa,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzD;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAC7B,aAAa,EAAE,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,CAAC,GACzG,OAAO;IAKV;;;;OAIG;cACa,OAAO,CACnB,aAAa,EAAE,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,CAAC,GACzG,OAAO,CAAC,YAAY,CAAC;IAoKxB;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;
|
|
1
|
+
{"version":3,"file":"browser-plugin.d.ts","sourceRoot":"","sources":["../src/browser-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAO,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAI3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAK7H,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAI3E,oFAAoF;AACpF,MAAM,WAAW,YAAa,SAAQ,MAAM;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACZ,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CAC7D;AAED,KAAK,OAAO,GAAG,WAAW,CAAC;AAC3B,KAAK,YAAY,GAAG,YAAY,CAAC;AACjC,UAAU,cAAc;CAAI;AAE5B,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IAClE,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,MAAM,EAAE,OAAO,CAAC;KACnB,CAAC;IACF;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC;AAYD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,aAAa,CACvD,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,aAAa,CAChB;IACG;;;;;OAKG;gBACS,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAI3E;;;;;;OAMG;IACH,OAAO,CAAC,aAAa,CAAwC;IAE7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAA+C;IAE1F;OACG;cACa,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzD;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAC7B,aAAa,EAAE,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,CAAC,GACzG,OAAO;IAKV;;;;OAIG;cACa,OAAO,CACnB,aAAa,EAAE,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,CAAC,GACzG,OAAO,CAAC,YAAY,CAAC;IAoKxB;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IA0FhC;;;;;OAKG;YACW,yBAAyB;IAkCvC;;;;;OAKG;YACW,qBAAqB;IAoCnC;;;;;;OAMG;YACW,+BAA+B;IAI7C;;;;OAIG;IAEH,SAAS,CAAC,iBAAiB,IAAI,oBAAoB;IAKnD;;;;OAIG;YACW,cAAc;IA8E5B;;;;OAIG;cACa,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IAOrF;;;;;;;;;;;OAWG;YACW,qBAAqB;CAqCtC"}
|
package/dist/browser-plugin.js
CHANGED
|
@@ -273,16 +273,45 @@ class CDPBrowserPlugin extends BrowserPlugin {
|
|
|
273
273
|
executablePath: launchOptions.executablePath,
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
//
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
276
|
+
// The window has to fit inside the screen the session CLAIMS. A page
|
|
277
|
+
// reads both: `window.outerWidth` wider than `screen.width`, or an
|
|
278
|
+
// inner viewport taller than `screen.availHeight`, describes a window
|
|
279
|
+
// hanging off the edge of its own display - which no window manager
|
|
280
|
+
// produces. Measured on the Apify platform 2026-08-12: a pinned
|
|
281
|
+
// 1920x1040 window against a claimed 1680x1050 Mac screen, so both
|
|
282
|
+
// relations were false at once.
|
|
283
|
+
//
|
|
284
|
+
// The available area is the limit, not the raw screen: the browser's
|
|
285
|
+
// own chrome (tab strip + omnibox, 87px on macOS) sits inside the
|
|
286
|
+
// window, so a window as tall as the screen already pushes its
|
|
287
|
+
// viewport past availHeight.
|
|
288
|
+
const claimedScreen = fingerprint?.fingerprint?.screen;
|
|
289
|
+
if (claimedScreen?.width && claimedScreen?.height) {
|
|
290
|
+
const maxWidth = claimedScreen.availWidth || claimedScreen.width;
|
|
291
|
+
const maxHeight = claimedScreen.availHeight || claimedScreen.height;
|
|
292
|
+
if (!launchOptions.windowWidth && !launchOptions.windowHeight) {
|
|
293
|
+
launchOptions.windowWidth = maxWidth;
|
|
294
|
+
launchOptions.windowHeight = maxHeight;
|
|
295
|
+
log.info('Using fingerprint screen dimensions for browser window', {
|
|
296
|
+
width: launchOptions.windowWidth,
|
|
297
|
+
height: launchOptions.windowHeight,
|
|
298
|
+
devicePixelRatio: claimedScreen.devicePixelRatio,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
const requestedWidth = launchOptions.windowWidth;
|
|
303
|
+
const requestedHeight = launchOptions.windowHeight;
|
|
304
|
+
launchOptions.windowWidth = Math.min(requestedWidth || maxWidth, maxWidth);
|
|
305
|
+
launchOptions.windowHeight = Math.min(requestedHeight || maxHeight, maxHeight);
|
|
306
|
+
if (launchOptions.windowWidth !== requestedWidth || launchOptions.windowHeight !== requestedHeight) {
|
|
307
|
+
log.info('Clamped window to the claimed screen - a window cannot exceed its own display', {
|
|
308
|
+
requested: `${requestedWidth}x${requestedHeight}`,
|
|
309
|
+
clamped: `${launchOptions.windowWidth}x${launchOptions.windowHeight}`,
|
|
310
|
+
claimedScreen: `${claimedScreen.width}x${claimedScreen.height}`,
|
|
311
|
+
claimedAvailable: `${maxWidth}x${maxHeight}`,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
286
315
|
}
|
|
287
316
|
else if (launchOptions.windowWidth && launchOptions.windowHeight) {
|
|
288
317
|
log.debug('Using explicitly set window dimensions', {
|