search for: n_glyph

Displaying 9 results from an estimated 9 matches for "n_glyph".

Did you mean: n_glyphs
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...bits; + if (swfdec_bits_left (&s->b)) { + SWFDEC_WARNING ("parsing shape didn't use %d bytes", + swfdec_bits_left (&s->b) / 8); } + s->b = save_bits; } int @@ -232,7 +229,7 @@ tag_func_define_font (SwfdecSwfDecoder * g_array_set_size (font->glyphs, n_glyphs); offset = swfdec_bits_get_u16 (&offsets); - for (i = 0; i < n_glyphs; i++) { + for (i = 0; i < n_glyphs && swfdec_bits_left (&s->b); i++) { SwfdecFontEntry *entry = &g_array_index (font->glyphs, SwfdecFontEntry, i); if (i + 1 == n_glyphs) next...
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...fdec_font.c +++ b/libswfdec/swfdec_font.c @@ -206,6 +206,7 @@ tag_func_define_font (SwfdecSwfDecoder * font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT); if (!font) return SWFDEC_STATUS_OK; + font->scale_factor = SWFDEC_TEXT_SCALE_FACTOR; offsets = s->b; n_glyphs = swfdec_bits_get_u16 (&s->b); @@ -234,16 +235,22 @@ tag_func_define_font (SwfdecSwfDecoder * } static void -get_kerning_record (SwfdecBits * bits, int wide_codes) +swfdec_font_parse_kerning_table (SwfdecSwfDecoder *s, SwfdecFont *font, gboolean wide_codes) { - if (wide_codes) { -...
2007 Feb 15
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_shape.c libswfdec/swfdec_tag.c
...neSprite happens and we check it doesn't */ s->parse_sprite = s->main_sprite; SWFDEC_LOG ("done parsing this sprite"); @@ -648,16 +623,16 @@ tag_func_define_font_2 (SwfdecSwfDecoder swfdec_shape_get_recs (s, shape); } if (wide_codes) { - bits->ptr += 2 * n_glyphs; + swfdec_bits_skip_bytes (bits, 2 * n_glyphs); } else { - bits->ptr += 1 * n_glyphs; + swfdec_bits_skip_bytes (bits, 1 * n_glyphs); } if (has_layout) { font_ascent = swfdec_bits_get_s16 (bits); font_descent = swfdec_bits_get_s16 (bits); font_leading = swfdec_bi...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...,6 +289,7 @@ tag_func_define_font_2 (SwfdecSwfDecoder int font_descent; int font_leading; int i; + guint skip; id = swfdec_bits_get_u16 (bits); font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT); @@ -318,10 +319,18 @@ tag_func_define_font_2 (SwfdecSwfDecoder n_glyphs = swfdec_bits_get_u16 (bits); if (wide_offsets) { - bits->ptr += 4 * n_glyphs; + skip = 4 * n_glyphs; + if (swfdec_bits_skip_bytes (bits, skip) != skip) { + SWFDEC_ERROR ("could not skip %u bytes", skip); + return SWFDEC_STATUS_OK; + } code_table_offset =...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...,6 +289,7 @@ tag_func_define_font_2 (SwfdecSwfDecoder int font_descent; int font_leading; int i; + guint skip; id = swfdec_bits_get_u16 (bits); font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT); @@ -318,10 +319,18 @@ tag_func_define_font_2 (SwfdecSwfDecoder n_glyphs = swfdec_bits_get_u16 (bits); if (wide_offsets) { - bits->ptr += 4 * n_glyphs; + skip = 4 * n_glyphs; + if (swfdec_bits_skip_bytes (bits, skip) != skip) { + SWFDEC_ERROR ("could not skip %u bytes", skip); + return SWFDEC_STATUS_OK; + } code_table_offset =...
2007 Jun 15
0
Branch 'as' - 5 commits - libswfdec/swfdec_as_native_function.c libswfdec/swfdec_edittext.c libswfdec/swfdec_edittext.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_morphshape.h
...EFINEFONTINFO2) language = swfdec_bits_get_u8 (&s->b); g_free (name); if (font->name) { @@ -205,7 +204,7 @@ swfdec_font_parse_shape (SwfdecSwfDecode } int -tag_func_define_font (SwfdecSwfDecoder * s) +tag_func_define_font (SwfdecSwfDecoder * s, guint tag) { guint i, id, n_glyphs, offset, next_offset; SwfdecFont *font; @@ -267,7 +266,7 @@ swfdec_font_parse_kerning_table (SwfdecS } int -tag_func_define_font_2 (SwfdecSwfDecoder * s) +tag_func_define_font_2 (SwfdecSwfDecoder * s, guint tag) { SwfdecBits *bits = &s->b; guint id; @@ -380,7 +379,7 @@ tag_fun...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...; - unsigned int id, len, i; + guint id, len, i; int reserved, wide, ansi, jis; char *name; /* we just assume Latin1 (FIXME: option to change this?) */ @@ -198,7 +198,7 @@ swfdec_font_parse_shape (SwfdecSwfDecode int tag_func_define_font (SwfdecSwfDecoder * s) { - unsigned int i, id, n_glyphs, offset, next_offset; + guint i, id, n_glyphs, offset, next_offset; SwfdecFont *font; SwfdecBits offsets; @@ -257,7 +257,7 @@ int tag_func_define_font_2 (SwfdecSwfDecoder * s) { SwfdecBits *bits = &s->b; - unsigned int id; + guint id; SwfdecShape *shape; SwfdecFont *fo...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...; - unsigned int id, len, i; + guint id, len, i; int reserved, wide, ansi, jis; char *name; /* we just assume Latin1 (FIXME: option to change this?) */ @@ -198,7 +198,7 @@ swfdec_font_parse_shape (SwfdecSwfDecode int tag_func_define_font (SwfdecSwfDecoder * s) { - unsigned int i, id, n_glyphs, offset, next_offset; + guint i, id, n_glyphs, offset, next_offset; SwfdecFont *font; SwfdecBits offsets; @@ -257,7 +257,7 @@ int tag_func_define_font_2 (SwfdecSwfDecoder * s) { SwfdecBits *bits = &s->b; - unsigned int id; + guint id; SwfdecShape *shape; SwfdecFont *fo...
2007 Apr 16
0
7 commits - libswfdec/swfdec_codec_gst.c libswfdec/swfdec_font.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_shape.c libswfdec/swfdec_shape.h libswfdec/swfdec_sprite.c
...= swfdec_bits_getbits (&s->b, 4); SWFDEC_LOG ("n_line_bits = %d", shape->n_line_bits); - swfdec_shape_get_recs (s, shape); + swfdec_shape_get_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse); } if (wide_codes) { swfdec_bits_skip_bytes (bits, 2 * n_glyphs); diff --git a/libswfdec/swfdec_pattern.c b/libswfdec/swfdec_pattern.c index 5efac10..0041aea 100644 --- a/libswfdec/swfdec_pattern.c +++ b/libswfdec/swfdec_pattern.c @@ -269,24 +269,13 @@ swfdec_gradient_pattern_init (SwfdecGrad /*** EXPORTED API ***/ -/** - * swfdec_pattern_parse: - * @dec:...