mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 00:20:55 +02:00
Fix Android compile error.
Cherry-picked from harfbuzz/harfbuzz@d88269c.
This commit is contained in:
+18
-12
@@ -732,16 +732,18 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
|
||||
|
||||
static int
|
||||
_hb_ft_move_to (const FT_Vector *to,
|
||||
hb_draw_session_t *drawing)
|
||||
void *arg)
|
||||
{
|
||||
hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
|
||||
drawing->move_to (to->x, to->y);
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
static int
|
||||
_hb_ft_line_to (const FT_Vector *to,
|
||||
hb_draw_session_t *drawing)
|
||||
void *arg)
|
||||
{
|
||||
hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
|
||||
drawing->line_to (to->x, to->y);
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
@@ -749,8 +751,9 @@ _hb_ft_line_to (const FT_Vector *to,
|
||||
static int
|
||||
_hb_ft_conic_to (const FT_Vector *control,
|
||||
const FT_Vector *to,
|
||||
hb_draw_session_t *drawing)
|
||||
void *arg)
|
||||
{
|
||||
hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
|
||||
drawing->quadratic_to (control->x, control->y,
|
||||
to->x, to->y);
|
||||
return FT_Err_Ok;
|
||||
@@ -760,8 +763,9 @@ static int
|
||||
_hb_ft_cubic_to (const FT_Vector *control1,
|
||||
const FT_Vector *control2,
|
||||
const FT_Vector *to,
|
||||
hb_draw_session_t *drawing)
|
||||
void *arg)
|
||||
{
|
||||
hb_draw_session_t *drawing = (hb_draw_session_t *) arg;
|
||||
drawing->cubic_to (control1->x, control1->y,
|
||||
control2->x, control2->y,
|
||||
to->x, to->y);
|
||||
@@ -787,10 +791,10 @@ hb_ft_get_glyph_shape (hb_font_t *font HB_UNUSED,
|
||||
return;
|
||||
|
||||
const FT_Outline_Funcs outline_funcs = {
|
||||
(FT_Outline_MoveToFunc) _hb_ft_move_to,
|
||||
(FT_Outline_LineToFunc) _hb_ft_line_to,
|
||||
(FT_Outline_ConicToFunc) _hb_ft_conic_to,
|
||||
(FT_Outline_CubicToFunc) _hb_ft_cubic_to,
|
||||
_hb_ft_move_to,
|
||||
_hb_ft_line_to,
|
||||
_hb_ft_conic_to,
|
||||
_hb_ft_cubic_to,
|
||||
0, /* shift */
|
||||
0, /* delta */
|
||||
};
|
||||
@@ -975,8 +979,9 @@ hb_ft_face_create_referenced (FT_Face ft_face)
|
||||
}
|
||||
|
||||
static void
|
||||
hb_ft_face_finalize (FT_Face ft_face)
|
||||
hb_ft_face_finalize (void *arg)
|
||||
{
|
||||
FT_Face ft_face = (FT_Face) arg;
|
||||
hb_face_destroy ((hb_face_t *) ft_face->generic.data);
|
||||
}
|
||||
|
||||
@@ -1008,7 +1013,7 @@ hb_ft_face_create_cached (FT_Face ft_face)
|
||||
ft_face->generic.finalizer (ft_face);
|
||||
|
||||
ft_face->generic.data = hb_ft_face_create (ft_face, nullptr);
|
||||
ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
|
||||
ft_face->generic.finalizer = hb_ft_face_finalize;
|
||||
}
|
||||
|
||||
return hb_face_reference ((hb_face_t *) ft_face->generic.data);
|
||||
@@ -1217,8 +1222,9 @@ get_ft_library ()
|
||||
}
|
||||
|
||||
static void
|
||||
_release_blob (FT_Face ft_face)
|
||||
_release_blob (void *arg)
|
||||
{
|
||||
FT_Face ft_face = (FT_Face) arg;
|
||||
hb_blob_destroy ((hb_blob_t *) ft_face->generic.data);
|
||||
}
|
||||
|
||||
@@ -1271,7 +1277,7 @@ hb_ft_font_set_funcs (hb_font_t *font)
|
||||
|
||||
|
||||
ft_face->generic.data = blob;
|
||||
ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
|
||||
ft_face->generic.finalizer = _release_blob;
|
||||
|
||||
_hb_ft_font_set_funcs (font, ft_face, true);
|
||||
hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING);
|
||||
|
||||
Reference in New Issue
Block a user