Skip to content

Commit

Permalink
Tools: Install and update necessary xterm fonts for WSL
Browse files Browse the repository at this point in the history
* WSL is missing the default fonts
* Without this, the xterm font size is unusably small on high DPI
  displays
* xfonts-base is already installed on standard ubuntu versions

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
  • Loading branch information
Ryanf55 authored and peterbarker committed Jan 3, 2025
1 parent 244e66a commit e0068ec
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Tools/environment_install/install-prereqs-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
[ ${RELEASE_CODENAME} == 'noble' ] ||
[ ${RELEASE_CODENAME} == 'oracular' ]; then
PYTHON_PKGS+=" matplotlib scipy opencv-python pyyaml"
SITL_PKGS+=" xterm libcsfml-dev libcsfml-audio${SITLCFML_VERSION} libcsfml-dev libcsfml-graphics${SITLCFML_VERSION} libcsfml-network${SITLCFML_VERSION} libcsfml-system${SITLCFML_VERSION} libcsfml-window${SITLCFML_VERSION} libsfml-audio${SITLFML_VERSION} libsfml-dev libsfml-graphics${SITLFML_VERSION} libsfml-network${SITLFML_VERSION} libsfml-system${SITLFML_VERSION} libsfml-window${SITLFML_VERSION}"
SITL_PKGS+=" xterm xfonts-base libcsfml-dev libcsfml-audio${SITLCFML_VERSION} libcsfml-dev libcsfml-graphics${SITLCFML_VERSION} libcsfml-network${SITLCFML_VERSION} libcsfml-system${SITLCFML_VERSION} libcsfml-window${SITLCFML_VERSION} libsfml-audio${SITLFML_VERSION} libsfml-dev libsfml-graphics${SITLFML_VERSION} libsfml-network${SITLFML_VERSION} libsfml-system${SITLFML_VERSION} libsfml-window${SITLFML_VERSION}"
else
SITL_PKGS="$SITL_PKGS xterm ${PYTHON_V}-matplotlib ${PYTHON_V}-serial ${PYTHON_V}-scipy ${PYTHON_V}-opencv libcsfml-dev libcsfml-audio${SITLCFML_VERSION} libcsfml-dev libcsfml-graphics${SITLCFML_VERSION} libcsfml-network${SITLCFML_VERSION} libcsfml-system${SITLCFML_VERSION} libcsfml-window${SITLCFML_VERSION} libsfml-audio${SITLFML_VERSION} libsfml-dev libsfml-graphics${SITLFML_VERSION} libsfml-network${SITLFML_VERSION} libsfml-system${SITLFML_VERSION} libsfml-window${SITLFML_VERSION} ${PYTHON_V}-yaml"
SITL_PKGS="$SITL_PKGS xterm xfonts-base ${PYTHON_V}-matplotlib ${PYTHON_V}-serial ${PYTHON_V}-scipy ${PYTHON_V}-opencv libcsfml-dev libcsfml-audio${SITLCFML_VERSION} libcsfml-dev libcsfml-graphics${SITLCFML_VERSION} libcsfml-network${SITLCFML_VERSION} libcsfml-system${SITLCFML_VERSION} libcsfml-window${SITLCFML_VERSION} libsfml-audio${SITLFML_VERSION} libsfml-dev libsfml-graphics${SITLFML_VERSION} libsfml-network${SITLFML_VERSION} libsfml-system${SITLFML_VERSION} libsfml-window${SITLFML_VERSION} ${PYTHON_V}-yaml"
fi
fi
if [[ $SKIP_AP_COV_ENV -ne 1 ]]; then
Expand Down Expand Up @@ -368,6 +368,12 @@ SITL_PKGS+=" ppp"
# Install all packages
$APT_GET install $BASE_PKGS $SITL_PKGS $PX4_PKGS $ARM_LINUX_PKGS $COVERAGE_PKGS

if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
# If xfonts-base was just installed, you need to rebuild the font information cache.
# https://discuss.ardupilot.org/t/using-the-gdb-window-on-a-high-dpi-display/128150/2
fc-cache
fi

heading "Check if we are inside docker environment..."
IS_DOCKER=false
if [[ ${AP_DOCKER_BUILD:-0} -eq 1 ]] || [[ -f /.dockerenv ]] || grep -Eq '(lxc|docker)' /proc/1/cgroup ; then
Expand Down

0 comments on commit e0068ec

Please sign in to comment.