[API] Remove const from font user_data
This commit is contained in:
parent
ea93e7b27c
commit
b467827806
|
@ -43,12 +43,12 @@ HB_BEGIN_DECLS
|
||||||
|
|
||||||
static hb_bool_t
|
static hb_bool_t
|
||||||
hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
|
hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data HB_UNUSED,
|
void *font_data HB_UNUSED,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
unsigned int point_index,
|
unsigned int point_index,
|
||||||
hb_position_t *x,
|
hb_position_t *x,
|
||||||
hb_position_t *y,
|
hb_position_t *y,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
if (font->parent) {
|
if (font->parent) {
|
||||||
hb_bool_t ret;
|
hb_bool_t ret;
|
||||||
|
@ -66,11 +66,11 @@ hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_font_get_glyph_advance_nil (hb_font_t *font HB_UNUSED,
|
hb_font_get_glyph_advance_nil (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data HB_UNUSED,
|
void *font_data HB_UNUSED,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_position_t *x_advance,
|
hb_position_t *x_advance,
|
||||||
hb_position_t *y_advance,
|
hb_position_t *y_advance,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
if (font->parent) {
|
if (font->parent) {
|
||||||
hb_font_get_glyph_advance (font->parent, glyph, x_advance, y_advance);
|
hb_font_get_glyph_advance (font->parent, glyph, x_advance, y_advance);
|
||||||
|
@ -83,10 +83,10 @@ hb_font_get_glyph_advance_nil (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
|
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data HB_UNUSED,
|
void *font_data HB_UNUSED,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_glyph_extents_t *extents,
|
hb_glyph_extents_t *extents,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
if (font->parent) {
|
if (font->parent) {
|
||||||
hb_font_get_glyph_extents (font->parent, glyph, extents);
|
hb_font_get_glyph_extents (font->parent, glyph, extents);
|
||||||
|
@ -101,10 +101,10 @@ hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static hb_codepoint_t
|
static hb_codepoint_t
|
||||||
hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
|
hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data HB_UNUSED,
|
void *font_data HB_UNUSED,
|
||||||
hb_codepoint_t unicode,
|
hb_codepoint_t unicode,
|
||||||
hb_codepoint_t variation_selector,
|
hb_codepoint_t variation_selector,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
if (font->parent)
|
if (font->parent)
|
||||||
return hb_font_get_glyph (font->parent, unicode, variation_selector);
|
return hb_font_get_glyph (font->parent, unicode, variation_selector);
|
||||||
|
@ -114,12 +114,12 @@ hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
|
hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data HB_UNUSED,
|
void *font_data HB_UNUSED,
|
||||||
hb_codepoint_t first_glyph,
|
hb_codepoint_t first_glyph,
|
||||||
hb_codepoint_t second_glyph,
|
hb_codepoint_t second_glyph,
|
||||||
hb_position_t *x_kern,
|
hb_position_t *x_kern,
|
||||||
hb_position_t *y_kern,
|
hb_position_t *y_kern,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
if (font->parent) {
|
if (font->parent) {
|
||||||
hb_font_get_kerning (font->parent, first_glyph, second_glyph, x_kern, y_kern);
|
hb_font_get_kerning (font->parent, first_glyph, second_glyph, x_kern, y_kern);
|
||||||
|
|
|
@ -128,25 +128,25 @@ typedef struct _hb_glyph_extents_t
|
||||||
} hb_glyph_extents_t;
|
} hb_glyph_extents_t;
|
||||||
|
|
||||||
|
|
||||||
typedef hb_bool_t (*hb_font_get_contour_point_func_t) (hb_font_t *font, const void *font_data,
|
typedef hb_bool_t (*hb_font_get_contour_point_func_t) (hb_font_t *font, void *font_data,
|
||||||
hb_codepoint_t glyph, unsigned int point_index,
|
hb_codepoint_t glyph, unsigned int point_index,
|
||||||
hb_position_t *x, hb_position_t *y,
|
hb_position_t *x, hb_position_t *y,
|
||||||
const void *user_data);
|
void *user_data);
|
||||||
typedef void (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, const void *font_data,
|
typedef void (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_position_t *x_advance, hb_position_t *y_advance,
|
hb_position_t *x_advance, hb_position_t *y_advance,
|
||||||
const void *user_data);
|
void *user_data);
|
||||||
typedef void (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, const void *font_data,
|
typedef void (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_glyph_extents_t *extents,
|
hb_glyph_extents_t *extents,
|
||||||
const void *user_data);
|
void *user_data);
|
||||||
typedef hb_codepoint_t (*hb_font_get_glyph_func_t) (hb_font_t *font, const void *font_data,
|
typedef hb_codepoint_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,
|
||||||
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
|
hb_codepoint_t unicode, hb_codepoint_t variation_selector,
|
||||||
const void *user_data);
|
void *user_data);
|
||||||
typedef void (*hb_font_get_kerning_func_t) (hb_font_t *font, const void *font_data,
|
typedef void (*hb_font_get_kerning_func_t) (hb_font_t *font, void *font_data,
|
||||||
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
|
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
|
||||||
hb_position_t *x_kern, hb_position_t *y_kern,
|
hb_position_t *x_kern, hb_position_t *y_kern,
|
||||||
const void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
20
src/hb-ft.cc
20
src/hb-ft.cc
|
@ -38,12 +38,12 @@ HB_BEGIN_DECLS
|
||||||
|
|
||||||
static hb_bool_t
|
static hb_bool_t
|
||||||
hb_ft_get_contour_point (hb_font_t *font HB_UNUSED,
|
hb_ft_get_contour_point (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data,
|
void *font_data,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
unsigned int point_index,
|
unsigned int point_index,
|
||||||
hb_position_t *x,
|
hb_position_t *x,
|
||||||
hb_position_t *y,
|
hb_position_t *y,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) font_data;
|
FT_Face ft_face = (FT_Face) font_data;
|
||||||
int load_flags = FT_LOAD_DEFAULT;
|
int load_flags = FT_LOAD_DEFAULT;
|
||||||
|
@ -67,11 +67,11 @@ hb_ft_get_contour_point (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_ft_get_glyph_advance (hb_font_t *font HB_UNUSED,
|
hb_ft_get_glyph_advance (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data,
|
void *font_data,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_position_t *x_advance,
|
hb_position_t *x_advance,
|
||||||
hb_position_t *y_advance,
|
hb_position_t *y_advance,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) font_data;
|
FT_Face ft_face = (FT_Face) font_data;
|
||||||
int load_flags = FT_LOAD_DEFAULT;
|
int load_flags = FT_LOAD_DEFAULT;
|
||||||
|
@ -87,10 +87,10 @@ hb_ft_get_glyph_advance (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
|
hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data,
|
void *font_data,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_glyph_extents_t *extents,
|
hb_glyph_extents_t *extents,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) font_data;
|
FT_Face ft_face = (FT_Face) font_data;
|
||||||
int load_flags = FT_LOAD_DEFAULT;
|
int load_flags = FT_LOAD_DEFAULT;
|
||||||
|
@ -109,10 +109,10 @@ hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static hb_codepoint_t
|
static hb_codepoint_t
|
||||||
hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
|
hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data,
|
void *font_data,
|
||||||
hb_codepoint_t unicode,
|
hb_codepoint_t unicode,
|
||||||
hb_codepoint_t variation_selector,
|
hb_codepoint_t variation_selector,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
|
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) font_data;
|
FT_Face ft_face = (FT_Face) font_data;
|
||||||
|
@ -130,12 +130,12 @@ hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hb_ft_get_kerning (hb_font_t *font HB_UNUSED,
|
hb_ft_get_kerning (hb_font_t *font HB_UNUSED,
|
||||||
const void *font_data,
|
void *font_data,
|
||||||
hb_codepoint_t first_glyph,
|
hb_codepoint_t first_glyph,
|
||||||
hb_codepoint_t second_glyph,
|
hb_codepoint_t second_glyph,
|
||||||
hb_position_t *x_kern,
|
hb_position_t *x_kern,
|
||||||
hb_position_t *y_kern,
|
hb_position_t *y_kern,
|
||||||
const void *user_data HB_UNUSED)
|
void *user_data HB_UNUSED)
|
||||||
{
|
{
|
||||||
FT_Face ft_face = (FT_Face) font_data;
|
FT_Face ft_face = (FT_Face) font_data;
|
||||||
FT_Vector kerning;
|
FT_Vector kerning;
|
||||||
|
|
Loading…
Reference in New Issue