[pve-devel] [PATCH manager 2/3] ui: add 'font-logos' stylesheet and font files
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Jun 7 12:59:23 CEST 2023
Am 03/05/2023 um 11:50 schrieb Christoph Heiss:
> From [0]. As they are licensed under the "Unlicence" license, including
> them here and re-distributing them should bear no problems [1].
>
> [0] https://github.com/Lukas-W/font-logos
> [1] https://choosealicense.com/licenses/unlicense/
>
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> ---
> Formatted the patch with `--no-binary` for now to ease reviewing, as it
> otherwise would be pretty big for the mailing list, due to the binary
> files. For testing, either download the latest release [2] and copy
> `assets/font-logs.{ttf,woff,woff2}` from the extraced folder to
> `www/css/fonts/`, or drop me a line and I can send the full patch
> off-list.
>
> There's also the possibility to build a customized version of the font
> from source, to reduce it down to just the logos needed for the ten
> distributions currently supported/recogized. The file sizes are reduced
> to about 10-20% of their original files, so might be worth to do that -
> for example, the .woff goes from 73kB to 9.2kB.
>
> It's fairly easy, basically just throwing out all unneeded entries in
> the `icons.tsv` file in the repo. If that would be preferred, I happily
> do that; adding some instructions too on how to replicate/rebuild the
> font as needed.
>
> [2] https://github.com/lukas-w/font-logos/releases/download/v1.0.1/font-logos-1.0.1.zip
>
> www/css/Makefile | 3 +-
> www/css/font-logos.css | 224 +++++++++++++++++++++++++++++++++
> www/css/fonts/Makefile | 14 +++
> www/css/fonts/README.md | 5 +
> www/css/fonts/font-logos.ttf | Bin 0 -> 29116 bytes
> www/css/fonts/font-logos.woff | Bin 0 -> 74576 bytes
> www/css/fonts/font-logos.woff2 | Bin 0 -> 15724 bytes
> www/index.html.tpl | 1 +
> 8 files changed, 246 insertions(+), 1 deletion(-)
> create mode 100644 www/css/font-logos.css
> create mode 100644 www/css/fonts/Makefile
> create mode 100644 www/css/fonts/README.md
> create mode 100644 www/css/fonts/font-logos.ttf
> create mode 100644 www/css/fonts/font-logos.woff
> create mode 100644 www/css/fonts/font-logos.woff2
Please, let's not repeat the mistake again and pull in some binary artefacts in
manager even if they don't are directly related to it.
Lets set up a separate package, that way we can also give proper attribution
(even if the license used wouldn't necessarily require it).
I created:
https://git.proxmox.com/?p=fonts-font-logos.git;a=summary
It contains a trivial packaging, the build fonts and the CSS file, but with the
web-font path adopted to use ../fonts/ to load them, just like Font Awesome does.
That way we can add it to pveproxy in a similar manner, please test if that works
out for you.
More information about the pve-devel
mailing list