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

Naohiro KORIYAMA nkoriyama at gmail.com
Wed Aug 29 16:44:16 CEST 2012


On OS X, fontconfig searches font only from /System/Library/Fonts.
It's an issue because of VLC's fontconfig installation.
But I cannot find a simple solution to fix fontconfig installation,
so adding font search paths where initailizing fontconfig at libass.
---
 contrib/src/ass/ass-macosx.patch | 12 ++++++++++++
 contrib/src/ass/rules.mak        |  3 +++
 2 files changed, 15 insertions(+)
 create mode 100644 contrib/src/ass/ass-macosx.patch

diff --git a/contrib/src/ass/ass-macosx.patch b/contrib/src/ass/ass-macosx.patch
new file mode 100644
index 0000000..f188c7d
--- /dev/null
+++ b/contrib/src/ass/ass-macosx.patch
@@ -0,0 +1,12 @@
+--- libass/libass/ass_fontconfig.c.orig	2011-09-02 06:26:35.000000000 +0900
++++ libass/libass/ass_fontconfig.c	2012-01-01 01:53:01.000000000 +0900
+@@ -442,6 +442,9 @@
+                 "file found, using fallback.");
+         FcConfigDestroy(priv->config);
+         priv->config = FcInitLoadConfig();
++        FcConfigAppFontAddDir(priv->config, "~/Library/Fonts");
++        FcConfigAppFontAddDir(priv->config, "/Library/Fonts");
++        FcConfigAppFontAddDir(priv->config, "/Network/Library/Fonts");
+         rc++;
+     }
+     if (rc && update) {
diff --git a/contrib/src/ass/rules.mak b/contrib/src/ass/rules.mak
index fa6f6d0..7bbc794 100644
--- a/contrib/src/ass/rules.mak
+++ b/contrib/src/ass/rules.mak
@@ -22,6 +22,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) fribidi
-- 
1.7.12




More information about the vlc-devel mailing list