Commit b5d615ed authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Freetype: rework includes

parent 984e48cc
......@@ -28,15 +28,36 @@
#ifndef VLC_FREETYPE_H
#define VLC_FREETYPE_H
#include <vlc_text_style.h> /* text_style_t*/
#include <vlc_arrays.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_text_style.h> /* text_style_t */
#include <vlc_arrays.h> /* vlc_dictionary_t */
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include FT_STROKER_H
#include "platform_fonts.h"
/* Consistency between Freetype versions and platforms */
#define FT_FLOOR(X) ((X & -64) >> 6)
#define FT_CEIL(X) (((X + 63) & -64) >> 6)
#ifndef FT_MulFix
# define FT_MulFix(v, s) (((v)*(s))>>16)
#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
/*****************************************************************************
* filter_sys_t: freetype local data
......@@ -44,6 +65,7 @@
* This structure is part of the video output thread descriptor.
* It describes the freetype specific properties of an output thread.
*****************************************************************************/
typedef struct vlc_family_t vlc_family_t;
struct filter_sys_t
{
FT_Library p_library; /* handle to library */
......@@ -51,7 +73,7 @@ struct filter_sys_t
FT_Stroker p_stroker; /* handle to path stroker object */
text_style_t *p_default_style;
text_style_t *p_forced_style;/* Renderer overridings */
text_style_t *p_forced_style; /* Renderer overridings */
/* More styles... */
float f_shadow_vector_x;
......@@ -85,17 +107,20 @@ struct filter_sys_t
int i_fallback_counter;
int i_scale;
/**
* Select a font, based on the family, the styles and the codepoint
*/
char * (*pf_select) (filter_t *, const char* family,
bool bold, bool italic,
int *index, uni_char_t codepoint);
/*
/**
* Get a pointer to the vlc_family_t in the master list that matches psz_family.
* Add this family to the list if it hasn't been added yet.
*/
const vlc_family_t * (*pf_get_family) ( filter_t *p_filter, const char *psz_family );
/*
/**
* Get the fallback list for psz_family from the system and cache
* it in fallback_map.
* On Windows fallback lists are populated progressively as required
......@@ -105,12 +130,6 @@ struct filter_sys_t
uni_char_t codepoint );
};
#define FT_FLOOR(X) ((X & -64) >> 6)
#define FT_CEIL(X) (((X + 63) & -64) >> 6)
#ifndef FT_MulFix
#define FT_MulFix(v, s) (((v)*(s))>>16)
#endif
FT_Face LoadFace( filter_t *p_filter, const char *psz_fontfile, int i_idx,
const text_style_t *p_style );
......
......@@ -45,20 +45,7 @@
# include "config.h"
#endif
#include <ft2build.h>
#include FT_FREETYPE_H
#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
#include "freetype.h"
/* Default fonts */
#ifdef __APPLE__
......@@ -121,7 +108,6 @@ struct vlc_font_t
/**
* Representation of font families (linked-list)
*/
typedef struct vlc_family_t vlc_family_t;
struct vlc_family_t
{
vlc_family_t *p_next; /**< next family in the chain */
......
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