Skip to content

Instantly share code, notes, and snippets.

@ShikiSuen
Last active August 6, 2019 03:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShikiSuen/ebd80e0eeb626eb435f838122124692c to your computer and use it in GitHub Desktop.
Save ShikiSuen/ebd80e0eeb626eb435f838122124692c to your computer and use it in GitHub Desktop.
STHeiti Cleaner.
#!/bin/bash
# At least works with macOS 10.12 - 10.14. Do not use this with macOS 10.11 and earlier.
# RUN THIS SCRIPT UNDER RECOVERY MODE.
# !! REMEMBER to change the next line to make sure it fits your actural system volume label.
cd "/Volumes/Macintosh HD/"
# Applying International Text Styles to Japanese GUI of current iTunes.
cp "Applications/iTunes.app/Contents/Resources/English.lproj/TextStyles.plist" "Applications/iTunes.app/Contents/Resources/Japanese.lproj/TextStyles.plist"
cd "system"
# Remove "Heiti SC / TC" collection files (shipped since Snow Leopard) and their derivative definitions.
find "$(pwd)" -name "STHeiti*" -type f -delete
# Remove STHeiti antiquities shipped with macOS Leopard.
find "$(pwd)" -name "华文*黑*" -type f -delete
find "$(pwd)" -name "STXihei*" -type f -delete
# Remove SIL Hei antiquities shipped with macOS 10.02-10.04.
find "$(pwd)" -name "Hei.ttf*" -type f -delete
find "$(pwd)" -name "SIL-Hei-Med-Jian.fontinfo" -type f -delete
# Remove LiHei Pro.
find "$(pwd)" -name "儷黑 Pro.ttf*" -type f -delete
find "$(pwd)" -name "LiHeiPro.fontinfo" -type f -delete
# Remove BiauKai shipped with macOS which has lack of compatibility exchanging MS Office files with Windows users.
find "$(pwd)" -name "BiauKai.ttf*" -type f -delete
find "$(pwd)" -name "DFKaiShu-SB-Estd-BF.fontinfo" -type f -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment