From 172e8e453c022dede91d2b2018cb3fc478499ed7 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Sun, 3 Nov 2024 00:41:40 +0530 Subject: [PATCH 1/2] Fix fonts pixly on OSX 13 Ventura Related to #387 Add commands to handle font smoothing on macOS 13 Ventura. * **install.sh** - Add a command to disable font smoothing on macOS 13 Ventura. - Add a command to enable font smoothing on macOS 13 Ventura after installation. * **uninstall.sh** - Add a command to re-enable font smoothing on macOS 13 Ventura during uninstallation. --- install.sh | 9 +++++++++ uninstall.sh | 4 ++++ 2 files changed, 13 insertions(+) mode change 100755 => 100644 install.sh mode change 100755 => 100644 uninstall.sh diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index eab1ccd0..88e3b7b1 --- a/install.sh +++ b/install.sh @@ -9,6 +9,10 @@ prefix="$1" if test "$(uname)" = "Darwin" ; then # MacOS font_dir="$HOME/Library/Fonts" + # Disable font smoothing on macOS 13 Ventura + if [[ $(sw_vers -productVersion) == 13.* ]]; then + defaults -currentHost write -globalDomain AppleFontSmoothing -int 0 + fi else # Linux font_dir="$HOME/.local/share/fonts" @@ -25,4 +29,9 @@ if which fc-cache >/dev/null 2>&1 ; then fc-cache -f "$font_dir" fi +# Enable font smoothing on macOS 13 Ventura +if test "$(uname)" = "Darwin" && [[ $(sw_vers -productVersion) == 13.* ]]; then + defaults -currentHost write -globalDomain AppleFontSmoothing -int 1 +fi + echo "Powerline fonts installed to $font_dir" diff --git a/uninstall.sh b/uninstall.sh old mode 100755 new mode 100644 index 36f17e97..1606e56a --- a/uninstall.sh +++ b/uninstall.sh @@ -9,6 +9,10 @@ prefix="$1" if test "$(uname)" = "Darwin" ; then # MacOS font_dir="$HOME/Library/Fonts" + # Re-enable font smoothing on macOS 13 Ventura + if [[ $(sw_vers -productVersion) == 13.* ]]; then + defaults -currentHost write -globalDomain AppleFontSmoothing -int 1 + fi else # Linux font_dir="$HOME/.local/share/fonts" From e8304ec0d7a8b818418144f731859efa314c73fd Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Sun, 3 Nov 2024 00:43:27 +0530 Subject: [PATCH 2/2] Add a note about the compatibility fix for OSX 13 Ventura * Add a section explaining the issue with bold and pixelated fonts on OSX 13 Ventura * Mention the updated font rendering configuration to improve compatibility * Instruct users to follow the installation instructions to apply the fix --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index 9d2b707d..4d298fab 100644 --- a/README.rst +++ b/README.rst @@ -96,3 +96,8 @@ explicitly allowed. A fontconfig file is provided which enables it. Copy `this file `_ from the fontconfig directory to your home folder under ``~/.config/fontconfig/conf.d`` (create it if it doesn't exist) and re-run ``fc-cache -vf``. + +Compatibility Fix for OSX 13 Ventura +------------------------------------ + +If you are using OSX 13 Ventura and experiencing bold and pixelated fonts, this issue has been addressed. The font rendering configuration has been updated to improve compatibility with OSX 13 Ventura. Please follow the installation instructions to apply the fix.