search for: wide_codes

Displaying 5 results from an estimated 5 matches for "wide_codes".

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
...T); 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) { - swfdec_bits_get_u16 (bits); - swfdec_bits_get_u16 (bits); - } else { - swfdec_bits_get_u8 (bits); - swfdec_bits_get_u8 (bits); + SwfdecBits *bits; + guint n_kernin...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...et_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse); + swfdec_bits_syncbits (&s->b); + } + if (i < n_glyphs) { + SWFDEC_ERROR ("data was only enough for %u glyphs, not %u", i, n_glyphs); + g_array_set_size (font->glyphs, i); + n_glyphs = i; } if (wide_codes) { swfdec_bits_skip_bytes (bits, 2 * n_glyphs); @@ -363,7 +369,7 @@ tag_func_define_font_2 (SwfdecSwfDecoder font_leading = swfdec_bits_get_s16 (bits); //font_advance_table = swfdec_bits_get_s16(bits); swfdec_bits_skip_bytes (bits, 2 * n_glyphs); - for (i = 0; i < n_glyphs...
2007 Feb 15
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_shape.c libswfdec/swfdec_tag.c
.../* this assumes that no recursive DefineSprite 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 (...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...me.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -237,7 +237,7 @@ tag_func_define_font (SwfdecSwfDecoder * static void swfdec_font_parse_kerning_table (SwfdecSwfDecoder *s, SwfdecFont *font, gboolean wide_codes) { - SwfdecBits *bits; + SwfdecBits *bits = &s->b; guint n_kernings, i; n_kernings = swfdec_bits_get_u16 (bits); diff --git a/libswfdec/swfdec_font.h b/libswfdec/swfdec_font.h index 23ecce4..babfa5a 100644 --- a/libswfdec/swfdec_font.h +++ b/libswfdec/swfdec_font.h @@ -1,7 +1,7 @@...
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
..._font_2 (SwfdecSwfDecoder shape->n_line_bits = 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 A...