[vlc-commits] contrib: libass added fontconfig font search paths for OS X.

Naohiro KORIYAMA git at videolan.org
Sat Sep 1 14:38:43 CEST 2012


vlc/vlc-2.0 | branch: master | Naohiro KORIYAMA <nkoriyama at gmail.com> | Wed Aug 29 16:44:16 2012 +0200| [25128f37dc3a564bce8d368333d8217c7d1314e9] | committer: Felix Paul Kühne

contrib: libass added fontconfig font search paths for OS X.

On OS X, fontconfig searches font only from /System/Library/Fonts, so this patch adds more search paths to its initialization.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
(cherry picked from commit 6bad0899ef262508992233fb12c35578f10165d5)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=25128f37dc3a564bce8d368333d8217c7d1314e9
---

 contrib/src/ass/ass-macosx.patch |   14 ++++++++++++++
 contrib/src/ass/rules.mak        |    3 +++
 2 files changed, 17 insertions(+)

diff --git a/contrib/src/ass/ass-macosx.patch b/contrib/src/ass/ass-macosx.patch
new file mode 100644
index 0000000..10376bf
--- /dev/null
+++ b/contrib/src/ass/ass-macosx.patch
@@ -0,0 +1,14 @@
+--- libass/libass/ass_fontconfig.c	2011-09-01 23:26:35.000000000 +0200
++++ libass-fixed/libass/ass_fontconfig.c	2012-09-01 14:34:17.000000000 +0200
+@@ -442,6 +442,11 @@
+                 "file found, using fallback.");
+         FcConfigDestroy(priv->config);
+         priv->config = FcInitLoadConfig();
++#ifdef __APPLE__
++        FcConfigAppFontAddDir(priv->config, "~/Library/Fonts");
++        FcConfigAppFontAddDir(priv->config, "/Library/Fonts");
++        FcConfigAppFontAddDir(priv->config, "/Network/Library/Fonts");
++#endif
+         rc++;
+     }
+     if (rc && update) {
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index 8e6dae4..978f6f1 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -14,6 +14,9 @@ $(TARBALLS)/libass-$(ASS_VERSION).tar.gz:
 
 libass: libass-$(ASS_VERSION).tar.gz .sum-ass
 	$(UNPACK)
+ifdef HAVE_MACOSX
+	$(APPLY) $(SRC)/ass/ass-macosx.patch
+endif
 	$(MOVE)
 
 DEPS_ass = freetype2 $(DEPS_freetype2) fontconfig $(DEPS_fontconfig) fribidi



More information about the vlc-commits mailing list