[libbluray-devel] Fix Win32 linking without freetype
hpi1
git at videolan.org
Mon Dec 1 21:43:28 CET 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Dec 1 12:19:30 2014 +0200| [6be544d0a3cb7b55a80b7d766688eea2dd0bdb1c] | committer: hpi1
Fix Win32 linking without freetype
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6be544d0a3cb7b55a80b7d766688eea2dd0bdb1c
---
src/libbluray/bdj/native/java_awt_BDFontMetrics.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bdj/native/java_awt_BDFontMetrics.c b/src/libbluray/bdj/native/java_awt_BDFontMetrics.c
index ca9d3f5..9d3f132 100644
--- a/src/libbluray/bdj/native/java_awt_BDFontMetrics.c
+++ b/src/libbluray/bdj/native/java_awt_BDFontMetrics.c
@@ -38,7 +38,11 @@
#include <fontconfig/fontconfig.h>
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && defined (HAVE_FT2)
+#define NEED_WIN32_FONTS
+#endif
+
+#ifdef NEED_WIN32_FONTS
#include "file/dirs.h" // win32_get_font_dir
#include <windows.h>
#endif
@@ -60,7 +64,7 @@
* Windows fonts
*/
-#ifdef _WIN32
+#ifdef NEED_WIN32_FONTS
typedef struct {
int bold;
@@ -152,7 +156,7 @@ static char *_win32_resolve_font(const char *family, int style)
return data.filename;
}
-#endif /* _WIN32 */
+#endif /* NEED_WIN32_FONTS */
/*
* fontconfig
@@ -271,7 +275,7 @@ Java_java_awt_BDFontMetrics_resolveFontN(JNIEnv * env, jclass cls, jstring jfont
if (lib) {
filename = _fontconfig_resolve_font(lib, font_family, font_style);
}
-#elif defined(_WIN32)
+#elif defined(NEED_WIN32_FONTS)
filename = _win32_resolve_font(font_family, font_style);
#else
BD_DEBUG(DBG_BDJ | DBG_CRIT, "BD-J font config support not compiled in\n");
More information about the libbluray-devel
mailing list