Update Android port
* src/sfnt.c (xmalloc, xrealloc): Improve behavior upon allocation failures during test. (sfnt_table_names): Add prep. (sfnt_transform_coordinates): Allow applying offsets during coordinate transform. (sfnt_decompose_compound_glyph): Defer offset computation until any component compound glyph is loaded, then apply it during the transform process. (sfnt_multiply_divide): Make available everywhere. Implement on 64 bit systems. (sfnt_multiply_divide_signed): New function. (sfnt_mul_fixed): Fix division overflow. (sfnt_curve_to_and_build_1, sfnt_build_glyph_outline): Remove outdated comment. (sfnt_build_outline_edges): Fix coding style. (sfnt_lookup_glyph_metrics): Allow looking up metrics without scaling. (struct sfnt_cvt_table): Fix type of cvt values. (struct sfnt_prep_table): New structure. (sfnt_read_cvt_table): Read cvt values in terms of fwords, not longs (as Apple's doc seems to say). (sfnt_read_fpgm_table): Fix memory allocation for font program table. (sfnt_read_prep_table): New function. (struct sfnt_interpreter_zone): New structure. (struct sfnt_interpreter_graphics_state): New fields `project', `move', `vector_dot_product'. Rename to `sfnt_graphics_state'. (struct sfnt_interpreter, sfnt_mul_f26dot6): Stop doing rounding division. (sfnt_init_graphics_state): (sfnt_make_interpreter): (MOVE): (SSW): (RAW): (SDS): (ADD): (SUB): (ABS): (NEG): (WCVTF): (_MIN): (S45ROUND): (SVTCAx): (sfnt_set_srounding_state): (sfnt_skip_code): (sfnt_interpret_unimplemented): (sfnt_interpret_fdef): (sfnt_interpret_idef): (sfnt_interpret_if): (sfnt_interpret_else): (sfnt_round_none): (sfnt_round_to_grid): (sfnt_round_to_double_grid): (sfnt_round_down_to_grid): (sfnt_round_up_to_grid): (sfnt_round_to_half_grid): (sfnt_round_super): (sfnt_validate_gs): (sfnt_interpret_run): (sfnt_interpret_font_program): (struct sfnt_test_dcontext): (sfnt_test_move_to): (sfnt_test_line_to): (sfnt_test_curve_to): (sfnt_test_get_glyph): (sfnt_test_free_glyph): (sfnt_test_span): (sfnt_test_edge_ignore): (sfnt_test_edge): (sfnt_test_raster): (test_interpreter_profile): (test_cvt_values): (test_interpreter_cvt): (test_interpreter_head): (sfnt_make_test_interpreter): (struct sfnt_interpreter_test): (sfnt_run_interpreter_test): (struct sfnt_generic_test_args): (sfnt_generic_check): (sfnt_check_srp0): (sfnt_check_szp0): (sfnt_check_sloop): (struct sfnt_rounding_test_args): (sfnt_check_rounding): (sfnt_check_smd): (sfnt_check_scvtci): (sfnt_check_sswci): (sfnt_check_ssw): (sfnt_check_flipon): (sfnt_check_flipoff): (npushb_test_args): (npushw_test_args): (pushb_test_args): (pushw_test_args): (stack_overflow_test_args): (stack_underflow_test_args): (rtg_test_args): (rtg_symmetric_test_args): (rtg_1_test_args): (rtg_1_symmetric_test_args): (rthg_test_args): (rthg_1_test_args): (rtdg_test_args): (rtdg_1_test_args): (rtdg_2_test_args): (rtdg_3_test_args): (else_test_args): (jmpr_test_args): (dup_test_args): (pop_test_args): (clear_test_args): (swap_test_args): (depth_test_args): (cindex_test_args): (mindex_test_args): (raw_test_args): (loopcall_test_args): (call_test_args): (fdef_test_args): (fdef_1_test_args): (endf_test_args): (ws_test_args): (rs_test_args): (wcvtp_test_args): (rcvt_test_args): (mppem_test_args): (mps_test_args): (debug_test_args): (lt_test_args): (all_tests): (main): Implement more instructions. * src/sfnt.h (enum sfnt_table, struct sfnt_glyph_metrics): Add new tables. Add comment.
This commit is contained in:
parent
d8e42afeac
commit
adb145f155
2 changed files with 3703 additions and 576 deletions
4268
src/sfnt.c
4268
src/sfnt.c
File diff suppressed because it is too large
Load diff
11
src/sfnt.h
11
src/sfnt.h
|
@ -45,6 +45,7 @@ enum sfnt_table
|
|||
SFNT_TABLE_META,
|
||||
SFNT_TABLE_CVT ,
|
||||
SFNT_TABLE_FPGM,
|
||||
SFNT_TABLE_PREP,
|
||||
};
|
||||
|
||||
#define SFNT_ENDOF(type, field, type1) \
|
||||
|
@ -758,10 +759,16 @@ struct sfnt_hmtx_table
|
|||
struct sfnt_glyph_metrics
|
||||
{
|
||||
/* Distance between origin and left edge of raster. Positive
|
||||
changes move rightwards. */
|
||||
changes move rightwards.
|
||||
|
||||
If sfnt_lookup_glyph_metrics is given a pixel size of -1,
|
||||
this is actually a sign extended fword. */
|
||||
sfnt_fixed lbearing;
|
||||
|
||||
/* Advance to next glyph's origin. */
|
||||
/* Advance to next glyph's origin.
|
||||
|
||||
If sfnt_lookup_glyph_metrics is given a pixel size of -1, this is
|
||||
actually a sign extended fword. */
|
||||
sfnt_fixed advance;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue