-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
feat(developer): kmc-package support remote fonts and files #12667
base: fix/developer/package-compiler-box-info-fields
Are you sure you want to change the base?
feat(developer): kmc-package support remote fonts and files #12667
Conversation
The concept here is that the 'Name' property for a file can now be a remote reference, rather than a local file. There are two supported formats in this commit: * GitHub: This is a cutdown version of a plain github.com URL, and must match this exact format: ``` github:<owner>/<repo>/raw/<hash>/<filepath/filename> ``` This format is mandated in order to ensure that we always have a hashed version of a file from the origin. This gives us reproducible builds, which avoids churn issues when font files change. Example: `github:silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf` gets https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf An alternative could be to just have `https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf` which could be matched with a regex in the same way as the `github` prefix, and would avoid the need to munge the input URL. **Discuss!** * fonts.languagetechnology.org: references just a font identifier. This is somewhat broken, because if the source file changes, we don't know about it and won't publish an updated version of the package. So this needs some more discussion (we could e.g. embed the version number in the request, e.g. `flo:[email protected]`). **Discuss!** ``` flo:<family> ``` e.g. `flo:andika` gets https://fonts.languagetechnology.org/fonts/sil/andika/Andika-Bold.ttf Future sources could be considered, e.g. noto. We don't want to allow arbitrary URLs, both for stability and for security reasons. This change is entirely compiler-side, so we don't need to make any changes to apps, and so packages will be backwardly compatible. A lot of work will need to be done with the Package Editor in TIKE to support this feature. Fixes: #11236
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Capturing discussion on font versioning. We need to think this through with FLO, caching of fonts, versioning updates. Marc Durdin Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney Marc Durdin Victor Gaultney 4:33 |
Another capture marc ross eberhard marc |
marc davidrowe marc eberhard silnrsi/fonts marc |
My current thinking on flo: references. Perhaps FLO needs to be a tool in Developer which resolves to a GH stable commit reference, as fonts with a url are all GitHub references in FLO. If we always use GH, then it will be exceptionally rare to have a stable uri disappear -- only if repos are removed or nasty actions like force pushes are done -- in which case we probably want to deal with it anyway. Additional feature: we can keep the original flo references as well, and use that to provide a hint message to flag when font updates are available, but do not attempt to use it directly. |
…at/developer/kmc-package-source-files-from-remotes-2
The concept here is that the 'Name' property for a file can now be a remote reference, rather than a local file. There are two supported formats in this commit:
GitHub: This is a cutdown version of a plain github.com URL, and must match this exact format:
This format is mandated in order to ensure that we always have a hashed version of a file from the origin. This gives us reproducible builds, which avoids churn issues when font files change.
Example:
github:silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf
gets https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttfAn alternative could be to just have
https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf
which could be matched with a regex in the same way as thegithub
prefix, and would avoid the need to munge the input URL. Discuss!fonts.languagetechnology.org: references just a font identifier. This is somewhat broken, because if the source file changes, we don't know about it and won't publish an updated version of the package. So this needs some more discussion (we could e.g. embed the version number in the request, e.g.
flo:[email protected]
). Discuss!e.g.
flo:andika
gets https://fonts.languagetechnology.org/fonts/sil/andika/Andika-Bold.ttfFuture sources could be considered, e.g. noto. We don't want to allow arbitrary URLs, both for stability and for security reasons.
This change is entirely compiler-side, so we don't need to make any changes to apps, and so packages will be backwardly compatible. A lot of work will need to be done with the Package Editor in TIKE to support this feature.
Replaces: #12336
Fixes: #11236
@keymanapp-test-bot skip