Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed System Fonts on Android #981

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.zip binary
*.zip binary
*.ttf binary
*.otf binary
*.ttc binary
55 changes: 55 additions & 0 deletions build/components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Components on Cromite

Cromite needs to download certain static files for certain features.
Specifically, the need arises from making the fonts used by the browser standard, in order to minimise the use of fingerprint scripts based on the fonts present on the device.

To do this, the automatic update of components was reactivated with some differences compared to Chromium:

- Since there is no backend, the response to the request for updates is static (see `query.json`). It currently resides on the cromite.org site because, deliberately, no request log is active.
- The update file (a zip file) is downloaded only once and, if already done, nothing more is requested externally, unless the user goes to `chrome://components` and requests the update check.

It is possible to generate a zip for the components in this way:

### prerequisites

- generate a der file, used to 'sign' the zip:

```
openssl genrsa 4096 | openssl pkcs8 \
-inform PEM -nocrypt -topk8 -outform DER \
-out cromite.pkcs8.der
```

currently the certificate used for cromite is in the pkcs8.der.asc, encrypted with gpg, so not public, for security reasons.

- build `crx3_build_action`, necessary for 'signing' the zip:

```
ninja -C out/lin64 crx3_build_action
```

### how to generate the zip

simply:

```
zip -j fonts.zip fonts/*
out/lin64/crx3_build_action fonts_component.zip fonts.zip pkcs8.der
```

the resulting zip cannot currently be unzipped with system tools.

The zip must contain the file `manifest.json`.

### important sections in the query.json

- `appid`:
is the value used to identify the component. currently I do not know how to create a new one, there is no documentation or code to generate it.
- `codebase`:
is the base url from which to download the file
- `name`:
is the name of the file to download, the url is "codebase + name"
- `hash_sha256`:
is the hash of the resulting zip, used for comparison. compatible with sha256sum
- `fp`:
currently not used, is an additional protection mechanism for which I have found no documentation.
Binary file added build/components/fonts/AndroidClock.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/ComingSoon.ttf
Binary file not shown.
Binary file added build/components/fonts/CutiveMono.ttf
Binary file not shown.
Binary file added build/components/fonts/DancingScript-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/DancingScript-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/DroidSans-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/DroidSans.ttf
Binary file not shown.
Binary file added build/components/fonts/DroidSansMono.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoColorEmoji.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoColorEmojiFlags.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoColorEmojiLegacy.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoNaskhArabic-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansAdlam-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansAhom-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansArmenian-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansBamum-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansBatak-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansBengali-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansBengaliUI-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansBrahmi-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansBuhid-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansCJK-Regular.ttc
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansCarian-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansChakma-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSansCham-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansCham-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansCoptic-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansDevanagari-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansEthiopic-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansGeorgian-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansGothic-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansGujarati-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansGurmukhi-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansGurmukhiUI-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansHatran-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSansHebrew-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansHebrew-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansKaithi-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansKannada-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansKannadaUI-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansKhmer-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansKhmerUI-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansKhojki-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLao-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLao-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLaoUI-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLaoUI-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLepcha-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLimbu-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansLisu-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLycian-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansLydian-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansMalayalam-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansMedefaidrin-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansMiao-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSansModi-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansMro-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansMyanmar-Bold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansNKo-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansNewa-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSansOgham-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansOriya-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansOriya-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansOriyaUI-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansOsage-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansRejang-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansRunic-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansSinhala-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansSinhalaUI-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansSoyombo-VF.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansTaiLe-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansTakri-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansTamil-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansTamilUI-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansTelugu-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansTeluguUI-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThaana-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThaana-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThai-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThai-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThaiUI-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansThaiUI-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansVai-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSansWancho-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSansYi-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerif-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerif-BoldItalic.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerif-Italic.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerif-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifArmenian-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifBengali-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifCJK-Regular.ttc
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSerifDogra-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifEthiopic-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifGeorgian-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifGujarati-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifGurmukhi-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifHebrew-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSerifKannada-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifKhmer-Bold.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifKhmer-Regular.otf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifLao-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifLao-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifMalayalam-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifMyanmar-Bold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/NotoSerifSinhala-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifTamil-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifTelugu-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifThai-Bold.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifThai-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifTibetan-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/NotoSerifYezidi-VF.ttf
Binary file not shown.
Binary file added build/components/fonts/Roboto-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/RobotoStatic-Regular.ttf
Binary file not shown.
Binary file added build/components/fonts/SourceSansPro-Bold.ttf
Binary file not shown.
Binary file not shown.
Binary file added build/components/fonts/SourceSansPro-Italic.ttf
Binary file not shown.
Binary file added build/components/fonts/SourceSansPro-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading