[vlc-commits] Freetype: add comments to platform_fonts header

Jean-Baptiste Kempf git at videolan.org
Sun Oct 25 18:20:35 CET 2015


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Oct 25 18:12:28 2015 +0100| [adb79e33f29a48c097fb27aa5a5da66546d638ee] | committer: Jean-Baptiste Kempf

Freetype: add comments to platform_fonts header

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

 modules/text_renderer/platform_fonts.c |   28 +++++++++++++++-------------
 modules/text_renderer/platform_fonts.h |    7 ++++---
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/modules/text_renderer/platform_fonts.c b/modules/text_renderer/platform_fonts.c
index b30374c..cb9c01e 100644
--- a/modules/text_renderer/platform_fonts.c
+++ b/modules/text_renderer/platform_fonts.c
@@ -36,18 +36,18 @@
 
 #include <vlc_common.h>
 #include <vlc_filter.h>                                      /* filter_sys_t */
-#include <vlc_text_style.h>                                   /* text_style_t*/
-#include <vlc_input.h>                         /* vlc_input_attachment_* */
+#include <vlc_text_style.h>                                  /* text_style_t */
+#include <vlc_input.h>                             /* vlc_input_attachment_* */
 #include <ctype.h>
 
 /* apple stuff */
 #ifdef __APPLE__
-#include <TargetConditionals.h>
-#if !TARGET_OS_IPHONE
-#include <Carbon/Carbon.h>
-#endif
-#include <sys/param.h>                         /* for MAXPATHLEN */
-#undef HAVE_FONTCONFIG
+# include <TargetConditionals.h>
+# if !TARGET_OS_IPHONE
+#  include <Carbon/Carbon.h>
+# endif
+# include <sys/param.h>                         /* for MAXPATHLEN */
+# undef HAVE_FONTCONFIG
 #endif
 
 /* Win32 GDI */
@@ -56,6 +56,13 @@
 # include <shlobj.h>
 # include <usp10.h>
 # include <vlc_charset.h>                                     /* FromT */
+# undef HAVE_FONTCONFIG
+#endif
+
+#ifdef __ANDROID__
+# include <vlc_xml.h>
+# include <vlc_stream.h>
+# undef HAVE_FONTCONFIG
 #endif
 
 /* FontConfig */
@@ -63,11 +70,6 @@
 # include <fontconfig/fontconfig.h>
 #endif
 
-#ifdef __ANDROID__
-#include <vlc_xml.h>
-#include <vlc_stream.h>
-#endif
-
 #include "platform_fonts.h"
 #include "freetype.h"
 
diff --git a/modules/text_renderer/platform_fonts.h b/modules/text_renderer/platform_fonts.h
index 5c6c0ca..d0cc655 100644
--- a/modules/text_renderer/platform_fonts.h
+++ b/modules/text_renderer/platform_fonts.h
@@ -127,7 +127,7 @@ vlc_family_t *FontConfig_GetFallbacks( filter_t *p_filter, const char *psz_famil
                                        uni_char_t codepoint );
 const vlc_family_t *FontConfig_GetFamily( filter_t *p_filter, const char *psz_family );
 int FontConfig_Prepare( filter_t *p_filter );
-#endif
+#endif /* FONTCONFIG */
 
 #if defined( _WIN32 ) && !VLC_WINSTORE_APP
 vlc_family_t *Win32_GetFallbacks( filter_t *p_filter, const char *psz_family,
@@ -142,14 +142,14 @@ char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
                         bool b_bold, bool b_italic,
                         int *i_idx, uni_char_t codepoint );
 #endif
-#endif
+#endif /* __APPLE__ */
 
 #ifdef __ANDROID__
 const vlc_family_t *Android_GetFamily( filter_t *p_filter, const char *psz_family );
 vlc_family_t *Android_GetFallbacks( filter_t *p_filter, const char *psz_family,
                                     uni_char_t codepoint );
 int Android_Prepare( filter_t *p_filter );
-#endif
+#endif /* __ANDROID__ */
 
 char* Dummy_Select( filter_t *p_filter, const char* family,
                     bool b_bold, bool b_italic,
@@ -238,6 +238,7 @@ void DumpDictionary( filter_t *p_filter, const vlc_dictionary_t *p_dict,
 /* String helpers */
 char* ToLower( const char *psz_src );
 
+/* Size helper, depending on the scaling factor */
 int ConvertToLiveSize( filter_t *p_filter, const text_style_t *p_style );
 
 #endif //PLATFORM_FONTS_H



More information about the vlc-commits mailing list