Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
1a779ce3
Commit
1a779ce3
authored
Mar 27, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: clean includes
parent
276a9657
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
41 deletions
+38
-41
modules/misc/text_renderer/freetype.c
modules/misc/text_renderer/freetype.c
+33
-38
modules/misc/text_renderer/text_renderer.h
modules/misc/text_renderer/text_renderer.h
+5
-3
No files found.
modules/misc/text_renderer/freetype.c
View file @
1a779ce3
/*****************************************************************************
* freetype.c : Put text on the video, using freetype2
*****************************************************************************
* Copyright (C) 2002 - 20
07
the VideoLAN team
* Copyright (C) 2002 - 20
11
the VideoLAN team
* $Id$
*
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
...
...
@@ -19,8 +19,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* along with this program; if not, write to the Free Software
Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
...
...
@@ -33,18 +33,29 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_stream.h>
#include <vlc_xml.h>
#include <vlc_input.h>
#include <vlc_strings.h>
#include <vlc_dialog.h>
#include <vlc_memory.h>
#include <vlc_charset.h>
#include <math.h>
#include <ft2build.h>
#include <vlc_stream.h>
/* stream_MemoryNew */
#include <vlc_input.h>
/* vlc_input_attachment_* */
#include <vlc_xml.h>
/* xml_reader */
#include <vlc_strings.h>
/* resolve_xml_special_chars */
#include <vlc_charset.h>
/* ToCharset */
#include <vlc_dialog.h>
/* FcCache dialog */
/* Default fonts */
#ifdef __APPLE__
# 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
/* Freetype */
#include <freetype/ftsynth.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
...
...
@@ -54,31 +65,16 @@
#define FT_MulFix(v, s) (((v)*(s))>>16)
#endif
#ifdef __APPLE__
#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
/* RTL */
#if defined(HAVE_FRIBIDI)
#include <fribidi/fribidi.h>
#endif
#ifdef HAVE_FONTCONFIG
#include <fontconfig/fontconfig.h>
#undef DEFAULT_FONT
#define DEFAULT_FONT FC_DEFAULT_FONT
# include <fribidi/fribidi.h>
#endif
/* FontConfig */
#ifdef HAVE_FONTCONFIG
# include <fontconfig/fontconfig.h>
# undef DEFAULT_FONT
# define DEFAULT_FONT FC_DEFAULT_FONT
# define HAVE_STYLES
#endif
...
...
@@ -159,7 +155,7 @@ vlc_module_begin ()
/* opacity valid on 0..255, with default 255 = fully opaque */
add_integer_with_range
(
"freetype-opacity"
,
255
,
0
,
255
,
NULL
,
OPACITY_TEXT
,
OPACITY_LONGTEXT
,
tru
e
)
OPACITY_TEXT
,
OPACITY_LONGTEXT
,
fals
e
)
change_safe
()
/* hook to the color values list, with default 0x00ffffff = white */
...
...
@@ -186,7 +182,6 @@ vlc_module_begin ()
vlc_module_end
()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
modules/misc/text_renderer/text_renderer.h
View file @
1a779ce3
...
...
@@ -18,11 +18,13 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* along with this program; if not, write to the Free Software
Foundation, Inc.,
* 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
;
struct
font_stack_t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment