Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e8ee1c23
Commit
e8ee1c23
authored
Jul 28, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: Remove text_renderer.*
parent
d817c978
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
123 deletions
+39
-123
modules/text_renderer/Makefile.am
modules/text_renderer/Makefile.am
+1
-1
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+13
-1
modules/text_renderer/freetype.h
modules/text_renderer/freetype.h
+23
-0
modules/text_renderer/text_layout.c
modules/text_renderer/text_layout.c
+0
-1
modules/text_renderer/text_layout.h
modules/text_renderer/text_layout.h
+2
-0
modules/text_renderer/text_renderer.c
modules/text_renderer/text_renderer.c
+0
-72
modules/text_renderer/text_renderer.h
modules/text_renderer/text_renderer.h
+0
-48
No files found.
modules/text_renderer/Makefile.am
View file @
e8ee1c23
...
@@ -4,10 +4,10 @@ libtdummy_plugin_la_SOURCES = text_renderer/tdummy.c
...
@@ -4,10 +4,10 @@ libtdummy_plugin_la_SOURCES = text_renderer/tdummy.c
text_LTLIBRARIES
=
libtdummy_plugin.la
text_LTLIBRARIES
=
libtdummy_plugin.la
libfreetype_plugin_la_SOURCES
=
\
libfreetype_plugin_la_SOURCES
=
\
text_renderer/text_renderer.c text_renderer/text_renderer.h
\
text_renderer/platform_fonts.c text_renderer/platform_fonts.h
\
text_renderer/platform_fonts.c text_renderer/platform_fonts.h
\
text_renderer/freetype.c text_renderer/freetype.h
\
text_renderer/freetype.c text_renderer/freetype.h
\
text_renderer/text_layout.c text_renderer/text_layout.h
text_renderer/text_layout.c text_renderer/text_layout.h
libfreetype_plugin_la_CPPFLAGS
=
$(AM_CPPFLAGS)
$(FREETYPE_CFLAGS)
libfreetype_plugin_la_CPPFLAGS
=
$(AM_CPPFLAGS)
$(FREETYPE_CFLAGS)
libfreetype_plugin_la_LIBADD
=
$(LIBM)
$(FREETYPE_LIBS)
libfreetype_plugin_la_LIBADD
=
$(LIBM)
$(FREETYPE_LIBS)
if
HAVE_FREETYPE
if
HAVE_FREETYPE
...
...
modules/text_renderer/freetype.c
View file @
e8ee1c23
...
@@ -72,7 +72,6 @@
...
@@ -72,7 +72,6 @@
#include <assert.h>
#include <assert.h>
#include "text_renderer.h"
#include "platform_fonts.h"
#include "platform_fonts.h"
#include "freetype.h"
#include "freetype.h"
#include "text_layout.h"
#include "text_layout.h"
...
@@ -1343,6 +1342,19 @@ static void Destroy( vlc_object_t *p_this )
...
@@ -1343,6 +1342,19 @@ static void Destroy( vlc_object_t *p_this )
free
(
p_sys
);
free
(
p_sys
);
}
}
bool
FaceStyleEquals
(
const
text_style_t
*
p_style1
,
const
text_style_t
*
p_style2
)
{
if
(
!
p_style1
||
!
p_style2
)
return
false
;
if
(
p_style1
==
p_style2
)
return
true
;
const
int
i_style_mask
=
STYLE_BOLD
|
STYLE_ITALIC
;
return
(
p_style1
->
i_style_flags
&
i_style_mask
)
==
(
p_style2
->
i_style_flags
&
i_style_mask
)
&&
!
strcmp
(
p_style1
->
psz_fontname
,
p_style2
->
psz_fontname
);
}
FT_Face
LoadFace
(
filter_t
*
p_filter
,
FT_Face
LoadFace
(
filter_t
*
p_filter
,
const
text_style_t
*
p_style
)
const
text_style_t
*
p_style
)
{
{
...
...
modules/text_renderer/freetype.h
View file @
e8ee1c23
...
@@ -25,6 +25,11 @@
...
@@ -25,6 +25,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#ifndef VLC_FREETYPE_H
#define VLC_FREETYPE_H
#include <vlc_text_style.h>
/* text_style_t*/
typedef
struct
faces_cache_t
typedef
struct
faces_cache_t
{
{
FT_Face
*
p_faces
;
FT_Face
*
p_faces
;
...
@@ -71,4 +76,22 @@ struct filter_sys_t
...
@@ -71,4 +76,22 @@ struct filter_sys_t
#define FT_MulFix(v, s) (((v)*(s))>>16)
#define FT_MulFix(v, s) (((v)*(s))>>16)
#endif
#endif
#ifdef __OS2__
typedef
uint16_t
uni_char_t
;
# define FREETYPE_TO_UCS "UCS-2LE"
#else
typedef
uint32_t
uni_char_t
;
# if defined(WORDS_BIGENDIAN)
# define FREETYPE_TO_UCS "UCS-4BE"
# else
# define FREETYPE_TO_UCS "UCS-4LE"
# endif
#endif
FT_Face
LoadFace
(
filter_t
*
p_filter
,
const
text_style_t
*
p_style
);
FT_Face
LoadFace
(
filter_t
*
p_filter
,
const
text_style_t
*
p_style
);
bool
FaceStyleEquals
(
const
text_style_t
*
p_style1
,
const
text_style_t
*
p_style2
);
#endif
modules/text_renderer/text_layout.c
View file @
e8ee1c23
...
@@ -56,7 +56,6 @@
...
@@ -56,7 +56,6 @@
# include <hb-ft.h>
# include <hb-ft.h>
#endif
#endif
#include "text_renderer.h"
#include "text_layout.h"
#include "text_layout.h"
#include "freetype.h"
#include "freetype.h"
...
...
modules/text_renderer/text_layout.h
View file @
e8ee1c23
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#include "freetype.h"
typedef
struct
typedef
struct
{
{
FT_BitmapGlyph
p_glyph
;
FT_BitmapGlyph
p_glyph
;
...
...
modules/text_renderer/text_renderer.c
deleted
100644 → 0
View file @
d817c978
/*****************************************************************************
* freetype.c : Put text on the video, using freetype2
*****************************************************************************
* Copyright (C) 2002 - 2012 VLC authors and VideoLAN
* $Id$
*
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
* Gildas Bazin <gbazin@videolan.org>
* Bernie Purcell <bitmap@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Felix Paul Kühne <fkuehne@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <errno.h>
#include <vlc_common.h>
#include <vlc_variables.h>
#include <vlc_filter.h>
/* filter_sys_t */
#include <vlc_xml.h>
/* xml_reader */
#include <vlc_charset.h>
/* ToCharset */
#include <vlc_strings.h>
/* resolve_xml_special_chars */
#include "text_renderer.h"
text_style_t
*
CreateStyle
(
char
*
psz_fontname
,
int
i_font_size
,
uint32_t
i_font_color
,
uint32_t
i_karaoke_bg_color
,
int
i_style_flags
)
{
text_style_t
*
p_style
=
text_style_New
();
if
(
!
p_style
)
return
NULL
;
p_style
->
psz_fontname
=
psz_fontname
?
strdup
(
psz_fontname
)
:
NULL
;
p_style
->
i_font_size
=
i_font_size
;
p_style
->
i_font_color
=
(
i_font_color
&
0x00ffffff
)
>>
0
;
p_style
->
i_font_alpha
=
(
i_font_color
&
0xff000000
)
>>
24
;
p_style
->
i_karaoke_background_color
=
(
i_karaoke_bg_color
&
0x00ffffff
)
>>
0
;
p_style
->
i_karaoke_background_alpha
=
(
i_karaoke_bg_color
&
0xff000000
)
>>
24
;
p_style
->
i_style_flags
|=
i_style_flags
;
return
p_style
;
}
bool
FaceStyleEquals
(
const
text_style_t
*
p_style1
,
const
text_style_t
*
p_style2
)
{
if
(
!
p_style1
||
!
p_style2
)
return
false
;
if
(
p_style1
==
p_style2
)
return
true
;
const
int
i_style_mask
=
STYLE_BOLD
|
STYLE_ITALIC
;
return
(
p_style1
->
i_style_flags
&
i_style_mask
)
==
(
p_style2
->
i_style_flags
&
i_style_mask
)
&&
!
strcmp
(
p_style1
->
psz_fontname
,
p_style2
->
psz_fontname
);
}
modules/text_renderer/text_renderer.h
deleted
100644 → 0
View file @
d817c978
/*****************************************************************************
* text_renderer.h : fonts, text styles helpers
*****************************************************************************
* Copyright (C) 2002 - 2013 VLC authors and VideoLAN
* $Id$
*
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
* Gildas Bazin <gbazin@videolan.org>
* Bernie Purcell <bitmap@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
* Felix Paul Kühne <fkuehne@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <vlc_text_style.h>
/* text_style_t*/
/* text_style_t functions */
text_style_t
*
CreateStyle
(
char
*
psz_fontname
,
int
i_font_size
,
uint32_t
i_font_color
,
uint32_t
i_karaoke_bg_color
,
int
i_style_flags
);
#ifdef __OS2__
typedef
uint16_t
uni_char_t
;
# define FREETYPE_TO_UCS "UCS-2LE"
#else
typedef
uint32_t
uni_char_t
;
# if defined(WORDS_BIGENDIAN)
# define FREETYPE_TO_UCS "UCS-4BE"
# else
# define FREETYPE_TO_UCS "UCS-4LE"
# endif
#endif
bool
FaceStyleEquals
(
const
text_style_t
*
p_style1
,
const
text_style_t
*
p_style2
);
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