diff --git a/selfdrive/assets/icons/arrow-down.png b/selfdrive/assets/icons/arrow-down.png new file mode 100644 index 0000000000..834c1cb8b9 --- /dev/null +++ b/selfdrive/assets/icons/arrow-down.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e12a3cf36fdef107d237457e20b44e16320414f9de8a1791aff1ec5fd85ccef +size 2390 diff --git a/selfdrive/assets/icons/arrow-right.png b/selfdrive/assets/icons/arrow-right.png new file mode 100644 index 0000000000..b275134f64 --- /dev/null +++ b/selfdrive/assets/icons/arrow-right.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a999d5f3e616eeafc310689accdd26efb90769596604a62c460ef8acece18bc +size 1734 diff --git a/selfdrive/assets/icons/arrow_right.png b/selfdrive/assets/icons/arrow_right.png deleted file mode 100644 index 9897695399..0000000000 --- a/selfdrive/assets/icons/arrow_right.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:edfbafa7fe485b20d26382f198856c3ea798e57826aa8c4553c49a35aee005ed -size 883 diff --git a/selfdrive/assets/icons/arrow_right.svg b/selfdrive/assets/icons/arrow_right.svg deleted file mode 100644 index c2df1310a2..0000000000 --- a/selfdrive/assets/icons/arrow_right.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb66f3b15fc670cb9ea2b17fc75984cc3fc4f0118b880ce555d3cc7672b72fa5 -size 583 diff --git a/selfdrive/assets/icons/backspace.png b/selfdrive/assets/icons/backspace.png index ece10a3d73..16686be6f5 100644 --- a/selfdrive/assets/icons/backspace.png +++ b/selfdrive/assets/icons/backspace.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36e16def9e727216e491cafbb3fe655f82797389b37d63946f1a9c030ecc6f96 -size 4470 +oid sha256:576da562df8eb513e64ccb614ec727b257cbca8b5507974d01efc0f64c5382c2 +size 6267 diff --git a/selfdrive/assets/icons/backspace.svg b/selfdrive/assets/icons/backspace.svg deleted file mode 100644 index 8da38a106a..0000000000 --- a/selfdrive/assets/icons/backspace.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10d92681ea39067298851a1d298959fbd1904e63431fbbcfff953f22a65b61c3 -size 468 diff --git a/selfdrive/assets/icons/capslock.png b/selfdrive/assets/icons/capslock.png new file mode 100644 index 0000000000..61414d7230 --- /dev/null +++ b/selfdrive/assets/icons/capslock.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6621d000d9514df1d636e9953941eadec415ff950724f26a61e0fcbaa7a3818 +size 5403 diff --git a/selfdrive/assets/icons/shift.png b/selfdrive/assets/icons/shift.png index 7026a807e7..de2a68b482 100644 --- a/selfdrive/assets/icons/shift.png +++ b/selfdrive/assets/icons/shift.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25abdab506c6ae81b0a379d86378e0ad73f6fa093be5dc81ed1f192e5b146044 -size 3113 +oid sha256:a93dd816bd0600ad47d10ebe530326bfa725dc31e4d5e1ee275f39b10f17a59d +size 4931 diff --git a/selfdrive/assets/icons/shift.svg b/selfdrive/assets/icons/shift.svg deleted file mode 100644 index 7f890856bd..0000000000 --- a/selfdrive/assets/icons/shift.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30f7cd752143d0d9148263d479d5c38809c9ecd64a0bfb5f0fe6d393faedcaa7 -size 232 diff --git a/selfdrive/assets/icons/shift_lock.png b/selfdrive/assets/icons/shift_lock.png deleted file mode 100644 index 1a0464ebcd..0000000000 --- a/selfdrive/assets/icons/shift_lock.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0796cb759559f1608a7498c2a00ca48e4d398e4a7b927778db0ae3f00b5c5bcb -size 3092 diff --git a/selfdrive/assets/icons/shift_lock.svg b/selfdrive/assets/icons/shift_lock.svg deleted file mode 100644 index 388e722b49..0000000000 --- a/selfdrive/assets/icons/shift_lock.svg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9eeae279ca4022f109e8a1873def65edfc86108c5315e0af98e7f413db75218 -size 1074 diff --git a/selfdrive/assets/prep-svg.sh b/selfdrive/assets/prep-svg.sh index 661464a5c6..d29ce3025d 100755 --- a/selfdrive/assets/prep-svg.sh +++ b/selfdrive/assets/prep-svg.sh @@ -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 /]*id=\"$id\"[^>]*>.*?<\/symbol>/s" "$BOOTSTRAP_SVG" \ + | sed "s//<\/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