selfdrive/assets: generate keyboard icons from bootstrap-icons (#35250)

* Revert "selfdrive/assets: add keyboard icons (#35247)"

This reverts commit a6456503b0.

* selfdrive/assets: use bootstrap icons, generate keyboard icons

* cleanup

* switch shift-fill for capslock
pull/35248/head
Cameron Clough 4 months ago committed by GitHub
parent 6adc7e6bdb
commit e9680a40bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/assets/icons/arrow-down.png
  2. 3
      selfdrive/assets/icons/arrow-right.png
  3. 3
      selfdrive/assets/icons/arrow_right.png
  4. 3
      selfdrive/assets/icons/arrow_right.svg
  5. 4
      selfdrive/assets/icons/backspace.png
  6. 3
      selfdrive/assets/icons/backspace.svg
  7. 3
      selfdrive/assets/icons/capslock.png
  8. 4
      selfdrive/assets/icons/shift.png
  9. 3
      selfdrive/assets/icons/shift.svg
  10. 3
      selfdrive/assets/icons/shift_lock.png
  11. 3
      selfdrive/assets/icons/shift_lock.svg
  12. 25
      selfdrive/assets/prep-svg.sh

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e12a3cf36fdef107d237457e20b44e16320414f9de8a1791aff1ec5fd85ccef
size 2390

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a999d5f3e616eeafc310689accdd26efb90769596604a62c460ef8acece18bc
size 1734

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:edfbafa7fe485b20d26382f198856c3ea798e57826aa8c4553c49a35aee005ed
size 883

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fb66f3b15fc670cb9ea2b17fc75984cc3fc4f0118b880ce555d3cc7672b72fa5
size 583

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:36e16def9e727216e491cafbb3fe655f82797389b37d63946f1a9c030ecc6f96
size 4470
oid sha256:576da562df8eb513e64ccb614ec727b257cbca8b5507974d01efc0f64c5382c2
size 6267

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10d92681ea39067298851a1d298959fbd1904e63431fbbcfff953f22a65b61c3
size 468

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6621d000d9514df1d636e9953941eadec415ff950724f26a61e0fcbaa7a3818
size 5403

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25abdab506c6ae81b0a379d86378e0ad73f6fa093be5dc81ed1f192e5b146044
size 3113
oid sha256:a93dd816bd0600ad47d10ebe530326bfa725dc31e4d5e1ee275f39b10f17a59d
size 4931

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30f7cd752143d0d9148263d479d5c38809c9ecd64a0bfb5f0fe6d393faedcaa7
size 232

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0796cb759559f1608a7498c2a00ca48e4d398e4a7b927778db0ae3f00b5c5bcb
size 3092

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e9eeae279ca4022f109e8a1873def65edfc86108c5315e0af98e7f413db75218
size 1074

@ -2,6 +2,24 @@
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
ICONS_DIR="$DIR/icons"
BOOTSTRAP_SVG="$DIR/../../third_party/bootstrap/bootstrap-icons.svg"
ICON_IDS=(
arrow-down
arrow-right
backspace
capslock
shift
)
ICON_FILL_COLOR="#fff"
# extract bootstrap icons
for id in "${ICON_IDS[@]}"; do
svg="${ICONS_DIR}/${id}.svg"
perl -0777 -ne "print \$& if /<symbol[^>]*id=\"$id\"[^>]*>.*?<\/symbol>/s" "$BOOTSTRAP_SVG" \
| sed "s/<symbol/<svg fill=\"$ICON_FILL_COLOR\"/; s/<\/symbol>/<\/svg>/" > "$svg"
done
# sudo apt install inkscape
@ -17,7 +35,12 @@ for svg in $(find $DIR -type f | grep svg$); do
else
export_dim="--export-height=512"
fi
inkscape "$svg" --export-filename="$png" $export_dim
inkscape "$svg" --export-filename="$png" "$export_dim"
optipng -o7 -strip all "$png"
done
# cleanup bootstrap SVGs
for id in "${ICON_IDS[@]}"; do
rm "${ICONS_DIR}/${id}.svg"
done

Loading…
Cancel
Save