|
@@ -1,43 +1,30 @@
|
|
|
-From 0f9caf58c96ae4027eb0fcb395ccaab7f212dbf4 Mon Sep 17 00:00:00 2001
|
|
|
+From 8b0ea8e7576fbecea238bffafa3798f86c1be9ba Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
|
|
|
Date: Wed, 22 Jan 2014 13:55:16 +0100
|
|
|
-Subject: [PATCH 04/14] freetype: added a fake font lookup mechanism for iOS to
|
|
|
+Subject: [PATCH 13/15] freetype: added a fake font lookup mechanism for iOS to
|
|
|
use the packaged demo fonts
|
|
|
|
|
|
---
|
|
|
+ modules/text_renderer/fonts/darwin.c | 40 ++++++++++++++++++++++++++++++++++
|
|
|
modules/text_renderer/freetype.c | 2 ++
|
|
|
- modules/text_renderer/platform_fonts.c | 40 ++++++++++++++++++++++++++++++++++
|
|
|
modules/text_renderer/platform_fonts.h | 3 +++
|
|
|
3 files changed, 45 insertions(+)
|
|
|
|
|
|
-diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
|
|
|
-index f55e23a..bc508c6 100644
|
|
|
---- a/modules/text_renderer/freetype.c
|
|
|
-+++ b/modules/text_renderer/freetype.c
|
|
|
-@@ -1206,6 +1206,8 @@ static int Create( vlc_object_t *p_this )
|
|
|
- #elif defined( __APPLE__ )
|
|
|
- #if !TARGET_OS_IPHONE
|
|
|
- p_sys->pf_select = MacLegacy_Select;
|
|
|
-+#else
|
|
|
-+ p_sys->pf_select = iOSFake_Select;
|
|
|
- #endif
|
|
|
- #elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME )
|
|
|
- p_sys->pf_select = Win32_Select;
|
|
|
-diff --git a/modules/text_renderer/platform_fonts.c b/modules/text_renderer/platform_fonts.c
|
|
|
-index 7869dba..deeaa7d 100644
|
|
|
---- a/modules/text_renderer/platform_fonts.c
|
|
|
-+++ b/modules/text_renderer/platform_fonts.c
|
|
|
-@@ -42,6 +42,9 @@
|
|
|
+diff --git a/modules/text_renderer/fonts/darwin.c b/modules/text_renderer/fonts/darwin.c
|
|
|
+index 26fb339..71061c6 100644
|
|
|
+--- a/modules/text_renderer/fonts/darwin.c
|
|
|
++++ b/modules/text_renderer/fonts/darwin.c
|
|
|
+@@ -40,6 +40,9 @@
|
|
|
#include <TargetConditionals.h>
|
|
|
#if !TARGET_OS_IPHONE
|
|
|
- #include <Carbon/Carbon.h>
|
|
|
+ # include <Carbon/Carbon.h>
|
|
|
+#else
|
|
|
+#include <CoreFoundation/CoreFoundation.h>
|
|
|
+#include <vlc_url.h>
|
|
|
#endif
|
|
|
#include <sys/param.h> /* for MAXPATHLEN */
|
|
|
- #undef HAVE_FONTCONFIG
|
|
|
-@@ -405,6 +408,43 @@ char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
|
|
|
+
|
|
|
+@@ -125,4 +128,41 @@ char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
|
|
|
|
|
|
return psz_path;
|
|
|
}
|
|
@@ -53,7 +40,7 @@ index 7869dba..deeaa7d 100644
|
|
|
+ VLC_UNUSED(i_idx);
|
|
|
+
|
|
|
+ CFURLRef fileURL;
|
|
|
-+ fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
|
|
|
++ fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
|
|
|
+ CFSTR("OpenSans-Regular.ttf"),
|
|
|
+ NULL,
|
|
|
+ NULL);
|
|
@@ -79,21 +66,32 @@ index 7869dba..deeaa7d 100644
|
|
|
+ return psz_path;
|
|
|
+}
|
|
|
#endif
|
|
|
+diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
|
|
|
+index 057447d..ff87929 100644
|
|
|
+--- a/modules/text_renderer/freetype.c
|
|
|
++++ b/modules/text_renderer/freetype.c
|
|
|
+@@ -1265,6 +1265,8 @@ static int Create( vlc_object_t *p_this )
|
|
|
+ #elif defined( __APPLE__ )
|
|
|
+ #if !TARGET_OS_IPHONE
|
|
|
+ p_sys->pf_select = MacLegacy_Select;
|
|
|
++#else
|
|
|
++ p_sys->pf_select = iOSFake_Select;
|
|
|
#endif
|
|
|
-
|
|
|
+ #elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME )
|
|
|
+ const char *const ppsz_win32_default[] =
|
|
|
diff --git a/modules/text_renderer/platform_fonts.h b/modules/text_renderer/platform_fonts.h
|
|
|
-index cff52b1..40b25fb 100644
|
|
|
+index abf76c7..67902bf 100644
|
|
|
--- a/modules/text_renderer/platform_fonts.h
|
|
|
+++ b/modules/text_renderer/platform_fonts.h
|
|
|
-@@ -95,6 +95,9 @@ char* Win32_Select( filter_t *p_filter, const char* family,
|
|
|
- #if !TARGET_OS_IPHONE
|
|
|
+@@ -155,6 +155,9 @@ const vlc_family_t *Win32_GetFamily( filter_t *p_filter, const char *psz_family
|
|
|
char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
|
|
|
- bool b_bold, bool b_italic, int i_size, int *i_idx );
|
|
|
+ bool b_bold, bool b_italic,
|
|
|
+ int *i_idx, uni_char_t codepoint );
|
|
|
+#else
|
|
|
+char *iOSFake_Select( filter_t *p_filter, const char* psz_fontname,
|
|
|
-+ bool b_bold, bool b_italic, int i_size, int *i_idx );
|
|
|
- #endif
|
|
|
++ bool b_bold, bool b_italic, int i_size, int *i_idx );
|
|
|
#endif
|
|
|
+ #endif /* __APPLE__ */
|
|
|
|
|
|
--
|
|
|
2.6.0
|