diff --git a/Makefile b/Makefile
index 53693bc5c..d3429e3be 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ include header.mk
ifeq (yes, $(BUILD_DARWIN))
osx-bundle:
- $(BIN_SHELL) tools/osx-bundle.sh "$(AEGISUB_COMMAND)" "$(BIN_WX_CONFIG)" DICT_DIR=$(DICT_DIR)
+ $(BIN_SHELL) tools/osx-bundle.sh "$(AEGISUB_COMMAND)" "$(BIN_WX_CONFIG)" "$(FONTCONFIG_CONF_DIR)" DICT_DIR=$(DICT_DIR)
osx-dmg: osx-bundle
codesign -s 'Mac Developer' --deep Aegisub.app || true
diff --git a/Makefile.inc.in b/Makefile.inc.in
index e702fc22a..f41ba2c72 100644
--- a/Makefile.inc.in
+++ b/Makefile.inc.in
@@ -105,6 +105,8 @@ ifeq (yes, $(BUILD_DARWIN))
LIBS_LUA = $(TOP)vendor/luajit/src/libluajit-aegisub.so
endif
+FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@
+
#####################
# DEBUG / DEVELOPMENT
#####################
diff --git a/configure.ac b/configure.ac
index 963ecba79..cc631d389 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,6 +206,9 @@ PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version)
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
+FONTCONFIG_CONF_DIR=$($PKG_CONFIG --variable=confdir fontconfig)
+AC_SUBST(FONTCONFIG_CONF_DIR)
+
AX_BOOST_BASE([boost_required_version])
AX_BOOST_LIB(chrono, BOOST_CHRONO_LIB, [chrono.hpp], [boost::chrono::system_clock::time_point time])
AX_BOOST_LIB(filesystem, BOOST_FILESYSTEM_LIB, [filesystem/path.hpp], [boost::filesystem::path("data.txt")])
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-fix-globaladvance.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-fix-globaladvance.conf
deleted file mode 100644
index 2a9c06325..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-fix-globaladvance.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
- GulimChe
- false
-
-
-
- DotumChe
- false
-
-
-
- BatangChe
- false
-
-
-
- GungsuhChe
- false
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-unhint-small-vera.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-unhint-small-vera.conf
deleted file mode 100644
index c4ebee9d4..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/20-unhint-small-vera.conf
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
- Bitstream Vera Sans
-
-
- 7.5
-
-
- false
-
-
-
-
-
- Bitstream Vera Serif
-
-
- 7.5
-
-
- false
-
-
-
-
-
- Bitstream Vera Sans Mono
-
-
- 7.5
-
-
- false
-
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-metric-aliases.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-metric-aliases.conf
deleted file mode 100644
index 87e44938b..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-metric-aliases.conf
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Nimbus Sans L
-
- Helvetica
-
-
-
-
- Nimbus Roman No9 L
-
- Times
-
-
-
-
- Nimbus Mono L
-
- Courier
-
-
-
-
-
-
- Liberation Sans
- Albany
- Albany AMT
-
- Arial
-
-
-
-
- Liberation Serif
- Thorndale
- Thorndale AMT
-
- Times New Roman
-
-
-
-
- Liberation Mono
- Cumberland
- Cumberland AMT
-
- Courier New
-
-
-
-
-
-
-
-
-
-
- Helvetica
-
- Arial
-
-
-
-
- Times
-
- Times New Roman
-
-
-
-
- Courier
-
- Courier New
-
-
-
-
-
-
- Arial
-
- Helvetica
-
-
-
-
- Times New Roman
-
- Times
-
-
-
-
- Courier New
-
- Courier
-
-
-
-
-
-
-
-
-
-
- Helvetica
-
- Nimbus Sans L
-
-
-
-
- Times
-
- Nimbus Roman No9 L
-
-
-
-
- Courier
-
- Nimbus Mono L
-
-
-
-
-
-
- Arial
-
- Liberation Sans
- Albany
- Albany AMT
-
-
-
-
- Times New Roman
-
- Liberation Serif
- Thorndale
- Thorndale AMT
-
-
-
-
- Courier New
-
- Liberation Mono
- Cumberland
- Cumberland AMT
-
-
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-urw-aliases.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-urw-aliases.conf
deleted file mode 100644
index 6bab15b67..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/30-urw-aliases.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
- Avant Garde
- URW Gothic L
-
-
- Bookman
- URW Bookman L
-
-
- New Century Schoolbook
- Century Schoolbook L
-
-
- Palatino
- URW Palladio L
-
-
- Zapf Chancery
- URW Chancery L
-
-
- Zapf Dingbats
- Dingbats
-
-
-
- Symbol
-
-
- Standard Symbols L
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/40-nonlatin.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/40-nonlatin.conf
deleted file mode 100644
index a875db08c..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/40-nonlatin.conf
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
- Nazli
- Lotoos
- Mitra
- Ferdosi
- Badr
- Zar
- Titr
- Jadid
- Kochi Mincho
- AR PL SungtiL GB
- AR PL Mingti2L Big5
- MS 明朝
- UnBatang
- Baekmuk Batang
- MgOpen Canonica
- Sazanami Mincho
- AR PL ZenKai Uni
- ZYSong18030
- FreeSerif
- serif
-
-
-
- Arshia
- Elham
- Farnaz
- Nasim
- Sina
- Roya
- Koodak
- Terafik
- Kochi Gothic
- AR PL KaitiM GB
- AR PL KaitiM Big5
- MS ゴシック
- UnDotum
- Baekmuk Dotum
- SimSun
- MgOpen Modata
- Sazanami Gothic
- AR PL ShanHeiSun Uni
- ZYSong18030
- FreeSans
- sans-serif
-
-
-
- NSimSun
- ZYSong18030
- FreeMono
- monospace
-
-
-
-
- Homa
- Kamran
- Fantezi
- Tabassom
- fantasy
-
-
-
-
- IranNastaliq
- Nafees Nastaleeq
- cursive
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/45-latin.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/45-latin.conf
deleted file mode 100644
index bdd164a04..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/45-latin.conf
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
- Bitstream Vera Serif
- DejaVu Serif
- Liberation Serif
- Times New Roman
- Times
- Nimbus Roman No9 L
- Luxi Serif
- Thorndale AMT
- Thorndale
- serif
-
-
-
- Bitstream Vera Sans
- DejaVu Sans
- Liberation Sans
- Arial
- Helvetica
- Verdana
- Albany AMT
- Albany
- Nimbus Sans L
- Luxi Sans
- sans-serif
-
-
-
- Bitstream Vera Sans Mono
- DejaVu Sans Mono
- Liberation Mono
- Courier New
- Courier
- Andale Mono
- Luxi Mono
- Cumberland AMT
- Cumberland
- Nimbus Mono L
- monospace
-
-
-
- Impact
- Copperplate Gothic Std
- Cooper Std
- Bauhaus Std
- fantasy
-
-
-
- ITC Zapf Chancery Std
- Zapfino
- Comic Sans MS
- cursive
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/49-sansserif.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/49-sansserif.conf
deleted file mode 100644
index c6209a7d3..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/49-sansserif.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
- sans-serif
-
-
- serif
-
-
- monospace
-
-
- sans-serif
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/51-local.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/51-local.conf
deleted file mode 100644
index ca9fbe195..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/51-local.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
- local.conf
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/60-latin.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/60-latin.conf
deleted file mode 100644
index 62bf0d461..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/60-latin.conf
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
- serif
-
- Bitstream Vera Serif
- DejaVu Serif
- Times New Roman
- Thorndale AMT
- Luxi Serif
- Nimbus Roman No9 L
- Times
-
-
-
- sans-serif
-
- Bitstream Vera Sans
- DejaVu Sans
- Verdana
- Arial
- Albany AMT
- Luxi Sans
- Nimbus Sans L
- Helvetica
- Lucida Sans Unicode
- BPG Glaho International
- Tahoma
-
-
-
- monospace
-
- Bitstream Vera Sans Mono
- DejaVu Sans Mono
- Andale Mono
- Courier New
- Cumberland AMT
- Luxi Mono
- Nimbus Mono L
- Courier
-
-
-
-
- fantasy
-
- Impact
- Copperplate Gothic Std
- Cooper Std
- Bauhaus Std
-
-
-
-
- cursive
-
- ITC Zapf Chancery Std
- Zapfino
- Comic Sans MS
-
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-fonts-persian.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-fonts-persian.conf
deleted file mode 100644
index 97b783ec4..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-fonts-persian.conf
+++ /dev/null
@@ -1,419 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Nesf
- Nesf2
-
-
- Nesf2
- Persian_sansserif_default
-
-
-
-
-
- Nazanin
- Nazli
-
-
- Lotus
- Lotoos
-
-
- Yaqut
- Yaghoot
-
-
- Yaghut
- Yaghoot
-
-
- Traffic
- Terafik
-
-
- Ferdowsi
- Ferdosi
-
-
- Fantezy
- Fantezi
-
-
-
-
-
-
-
- Jadid
- Persian_title
-
-
- Titr
- Persian_title
-
-
-
-
- Kamran
-
- Persian_fantasy
- Homa
-
-
-
- Homa
-
- Persian_fantasy
- Kamran
-
-
-
- Fantezi
- Persian_fantasy
-
-
- Tabassom
- Persian_fantasy
-
-
-
-
- Arshia
- Persian_square
-
-
- Nasim
- Persian_square
-
-
- Elham
-
- Persian_square
- Farnaz
-
-
-
- Farnaz
-
- Persian_square
- Elham
-
-
-
- Sina
- Persian_square
-
-
-
-
-
-
- Persian_title
-
- Titr
- Jadid
- Persian_serif
-
-
-
-
-
- Persian_fantasy
-
- Homa
- Kamran
- Fantezi
- Tabassom
- Persian_square
-
-
-
-
-
- Persian_square
-
- Arshia
- Elham
- Farnaz
- Nasim
- Sina
- Persian_serif
-
-
-
-
-
-
-
- Elham
-
-
- farsiweb
-
-
-
-
-
- Homa
-
-
- farsiweb
-
-
-
-
-
- Koodak
-
-
- farsiweb
-
-
-
-
-
- Nazli
-
-
- farsiweb
-
-
-
-
-
- Roya
-
-
- farsiweb
-
-
-
-
-
- Terafik
-
-
- farsiweb
-
-
-
-
-
- Titr
-
-
- farsiweb
-
-
-
-
-
-
-
-
-
- TURNED-OFF
-
-
- farsiweb
-
-
-
- roman
-
-
-
- roman
-
-
-
-
- matrix
- 1-0.2
- 01
-
-
-
-
-
- oblique
-
-
-
-
-
-
-
-
- farsiweb
-
-
- false
-
-
- false
-
-
- false
-
-
-
-
-
-
-
-
- serif
-
- Nazli
- Lotoos
- Mitra
- Ferdosi
- Badr
- Zar
-
-
-
-
-
- sans-serif
-
- Roya
- Koodak
- Terafik
-
-
-
-
-
- monospace
-
-
- Terafik
-
-
-
-
-
- fantasy
-
- Homa
- Kamran
- Fantezi
- Tabassom
-
-
-
-
-
- cursive
-
- IranNastaliq
- Nafees Nastaleeq
-
-
-
-
-
-
-
-
- serif
-
-
- 200
-
-
- 24
-
-
- Titr
-
-
-
-
-
-
- sans-serif
-
-
- 200
-
-
- 24
-
-
- Titr
-
-
-
-
-
-
- Persian_sansserif_default
-
-
- 200
-
-
- 24
-
-
- Titr
-
-
-
-
-
-
-
-
- Persian_sansserif_default
-
-
- Roya
-
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-nonlatin.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-nonlatin.conf
deleted file mode 100644
index 4b3a946c9..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/65-nonlatin.conf
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
-
-
- serif
-
- Artsounk
- BPG UTF8 M
- Phaisarn
- Phaisarn98
- Norasi
- Frank Ruehl
- Dror
- JG LaoTimes
- Saysettha Unicode
- Pigiarniq
- B Davat
- B Compset
- Kacst-Qr
- Urdu Nastaliq Unicode
- Raghindi
- Mukti Narrow
- malayalam
- Sampige
- padmaa
- Hapax Berbère
- MS Gothic
- UmePlus P Gothic
- SimSun
- PMingLiu
- AR PL ShanHeiSun Uni
- AR PL New Sung
- ZYSong18030
- HanyiSong
- MgOpen Canonica
- Sazanami Mincho
- IPAMonaMincho
- IPAMincho
- Kochi Mincho
- AR PL SungtiL GB
- AR PL Mingti2L Big5
- AR PL Zenkai Uni
- MS 明朝
- ZYSong18030
- UnBatang
- Baekmuk Batang
- KacstQura
- Frank Ruehl CLM
- Lohit Bengali
- Lohit Gujarati
- Lohit Hindi
- Lohit Punjabi
- Lohit Tamil
- Lohit Malayalam
- Lohit Kannada
- Lohit Telugu
- Lohit Oriya
- LKLUG
-
-
-
- sans-serif
-
- Nachlieli
- Lucida Sans Unicode
- Yudit Unicode
- Kerkis
- ArmNet Helvetica
- Artsounk
- BPG UTF8 M
- Norasi
- Saysettha Unicode
- JG Lao Old Arial
- GF Zemen Unicode
- Pigiarniq
- B Davat
- B Compset
- Kacst-Qr
- Urdu Nastaliq Unicode
- Raghindi
- Mukti Narrow
- malayalam
- Sampige
- padmaa
- Hapax Berbère
- MS Gothic
- UmePlus P Gothic
-
- SimSun
- PMingLiu
- AR PL ShanHeiSun Uni
- AR PL New Sung
- MgOpen Modata
- VL Gothic
- IPAMonaGothic
- IPAGothic
- Sazanami Gothic
- Kochi Gothic
- AR PL KaitiM GB
- AR PL KaitiM Big5
- AR PL ShanHeiSun Uni
- AR PL SungtiL GB
- AR PL Mingti2L Big5
- MS ゴシック
- ZYSong18030
- TSCu_Paranar
- UnDotum
- Baekmuk Dotum
- Baekmuk Gulim
- KacstQura
- Lohit Bengali
- Lohit Gujarati
- Lohit Hindi
- Lohit Punjabi
- Lohit Tamil
- Lohit Malayalam
- Lohit Kannada
- Lohit Telugu
- Lohit Oriya
- LKLUG
-
-
-
- monospace
-
- Miriam Mono
- VL Gothic
- IPAMonaGothic
- IPAGothic
- Sazanami Gothic
- Kochi Gothic
- AR PL KaitiM GB
- MS Gothic
- UmePlus Gothic
- NSimSun
- MingLiu
- AR PL ShanHeiSun Uni
- AR PL New Sung Mono
- HanyiSong
- AR PL SungtiL GB
- AR PL Mingti2L Big5
- ZYSong18030
- UnBatang
- UnDotum
- Baekmuk Batang
- Baekmuk Dotum
- Baekmuk Gulim
- Courier MonoThai
- Hasida
- Mitra Mono
- GF Zemen Unicode
- Hapax Berbère
- Lohit Bengali
- Lohit Gujarati
- Lohit Hindi
- Lohit Punjabi
- Lohit Tamil
- Lohit Malayalam
- Lohit Kannada
- Lohit Telugu
- Lohit Oriya
- LKLUG
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/69-unifont.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/69-unifont.conf
deleted file mode 100644
index 177dec5d4..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/69-unifont.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- serif
-
- FreeSerif
- Code2000
- Code2001
-
-
-
- sans-serif
-
- FreeSans
- Arial Unicode MS
- Arial Unicode
- Code2000
- Code2001
-
-
-
- monospace
-
- FreeMono
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/80-delicious.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/80-delicious.conf
deleted file mode 100644
index 728f50cae..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/80-delicious.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
- Delicious
-
-
- Heavy
-
-
- heavy
-
-
-
-
diff --git a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/90-synthetic.conf b/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/90-synthetic.conf
deleted file mode 100644
index 63d9b891b..000000000
--- a/packages/osx_bundle/Contents/Resources/etc/fonts/conf.d/90-synthetic.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
- roman
-
-
-
- roman
-
-
-
-
- matrix
- 10.2
- 01
-
-
-
-
-
- oblique
-
-
-
- false
-
-
-
-
-
-
-
-
- medium
-
-
-
- medium
-
-
-
- true
-
-
-
- bold
-
-
-
diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh
index 6c3ccce18..b400d4a51 100755
--- a/tools/osx-bundle.sh
+++ b/tools/osx-bundle.sh
@@ -8,6 +8,7 @@ AEGISUB_BIN="${1}"
SRCDIR=`pwd`
HOME_DIR=`echo ~`
WX_PREFIX=`${2} --prefix`
+FONTCONFIG_CONF_DIR="${3}"
if ! test -d packages/osx_bundle; then
echo
@@ -46,7 +47,7 @@ find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
cp ${SKEL_DIR}/Contents/Resources/*.icns "${PKG_DIR}/Contents/Resources"
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.dtd "${PKG_DIR}/Contents/Resources/etc/fonts"
cat ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.conf | sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Resources/etc/fonts/fonts.conf"
-cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d"
+cp ${FONTCONFIG_CONF_DIR}/conf.d/*.conf "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d"
cat ${SKEL_DIR}/Contents/Info.plist | sed -f tools/osx-bundle.sed > "${PKG_DIR}/Contents/Info.plist"
rm languages