Commit 1a779ce3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Freetype: clean includes

parent 276a9657
/***************************************************************************** /*****************************************************************************
* freetype.c : Put text on the video, using freetype2 * freetype.c : Put text on the video, using freetype2
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 - 2007 the VideoLAN team * Copyright (C) 2002 - 2011 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org> * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
...@@ -33,18 +33,29 @@ ...@@ -33,18 +33,29 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_filter.h> #include <vlc_stream.h> /* stream_MemoryNew */
#include <vlc_stream.h> #include <vlc_input.h> /* vlc_input_attachment_* */
#include <vlc_xml.h> #include <vlc_xml.h> /* xml_reader */
#include <vlc_input.h> #include <vlc_strings.h> /* resolve_xml_special_chars */
#include <vlc_strings.h> #include <vlc_charset.h> /* ToCharset */
#include <vlc_dialog.h> #include <vlc_dialog.h> /* FcCache dialog */
#include <vlc_memory.h>
#include <vlc_charset.h> /* Default fonts */
#ifdef __APPLE__
#include <math.h> # define DEFAULT_FONT "/Library/Fonts/Arial Black.ttf"
# define FC_DEFAULT_FONT "Arial Black"
#include <ft2build.h> #elif defined( WIN32 )
# define DEFAULT_FONT "" /* Default font found at run-time */
# define FC_DEFAULT_FONT "Arial"
#elif defined( HAVE_MAEMO )
# define DEFAULT_FONT "/usr/share/fonts/nokia/nosnb.ttf"
# define FC_DEFAULT_FONT "Nokia Sans Bold"
#else
# define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
# define FC_DEFAULT_FONT "Serif Bold"
#endif
/* Freetype */
#include <freetype/ftsynth.h> #include <freetype/ftsynth.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_GLYPH_H #include FT_GLYPH_H
...@@ -54,31 +65,16 @@ ...@@ -54,31 +65,16 @@
#define FT_MulFix(v, s) (((v)*(s))>>16) #define FT_MulFix(v, s) (((v)*(s))>>16)
#endif #endif
#ifdef __APPLE__ /* RTL */
#define DEFAULT_FONT "/Library/Fonts/Arial Black.ttf"
#define FC_DEFAULT_FONT "Arial Black"
#elif defined( WIN32 )
#define DEFAULT_FONT "" /* Default font found at run-time */
#define FC_DEFAULT_FONT "Arial"
#elif defined( HAVE_MAEMO )
#define DEFAULT_FONT "/usr/share/fonts/nokia/nosnb.ttf"
#define FC_DEFAULT_FONT "Nokia Sans Bold"
#else
#define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf"
#define FC_DEFAULT_FONT "Serif Bold"
#endif
#if defined(HAVE_FRIBIDI) #if defined(HAVE_FRIBIDI)
#include <fribidi/fribidi.h> # include <fribidi/fribidi.h>
#endif
#ifdef HAVE_FONTCONFIG
#include <fontconfig/fontconfig.h>
#undef DEFAULT_FONT
#define DEFAULT_FONT FC_DEFAULT_FONT
#endif #endif
/* FontConfig */
#ifdef HAVE_FONTCONFIG #ifdef HAVE_FONTCONFIG
# include <fontconfig/fontconfig.h>
# undef DEFAULT_FONT
# define DEFAULT_FONT FC_DEFAULT_FONT
# define HAVE_STYLES # define HAVE_STYLES
#endif #endif
...@@ -159,7 +155,7 @@ vlc_module_begin () ...@@ -159,7 +155,7 @@ vlc_module_begin ()
/* opacity valid on 0..255, with default 255 = fully opaque */ /* opacity valid on 0..255, with default 255 = fully opaque */
add_integer_with_range( "freetype-opacity", 255, 0, 255, NULL, add_integer_with_range( "freetype-opacity", 255, 0, 255, NULL,
OPACITY_TEXT, OPACITY_LONGTEXT, true ) OPACITY_TEXT, OPACITY_LONGTEXT, false )
change_safe() change_safe()
/* hook to the color values list, with default 0x00ffffff = white */ /* hook to the color values list, with default 0x00ffffff = white */
...@@ -186,7 +182,6 @@ vlc_module_begin () ...@@ -186,7 +182,6 @@ vlc_module_begin ()
vlc_module_end () vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
......
...@@ -18,11 +18,13 @@ ...@@ -18,11 +18,13 @@
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include <vlc_memory.h> #include <vlc_memory.h> /* realloc_or_free */
#include <vlc_text_style.h> /* text_style_t*/
#include <vlc_filter.h> /* filter_sys_t */
typedef struct font_stack_t font_stack_t; typedef struct font_stack_t font_stack_t;
struct font_stack_t struct font_stack_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment