search for: swfdecfontentry

Displaying 7 results from an estimated 7 matches for "swfdecfontentry".

2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...ts; } 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_offset = offset + swfdec_bits_left (&s->b) / 8; @@ -241,6 +238,10 @@ tag_func_define_font (SwfdecSwfDecoder * swfdec_font_parse_shape (s, entry, next_offset - offset); offset...
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
...p_bytes (bits, n_glyphs * 2 + 2) != n_glyphs * 2 + 2) { + SWFDEC_ERROR ("DefineFont3 too short"); + return SWFDEC_STATUS_OK; + } + offset = swfdec_bits_get_u16 (&offsets); + } + g_array_set_size (font->glyphs, n_glyphs); + for (i = 0; i < n_glyphs; i++) { + SwfdecFontEntry *entry = &g_array_index (font->glyphs, SwfdecFontEntry, i); + if (wide_offsets) + next_offset = swfdec_bits_get_u32 (&offsets); + else + next_offset = swfdec_bits_get_u16 (&offsets); + swfdec_font_parse_shape (s, entry, next_offset - offset); + offset = next_off...
2007 Apr 03
0
11 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec-gtk/swfdec_source.c libswfdec/swfdec_cached.c libswfdec/swfdec_font.c libswfdec/swfdec_morphshape.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c
....1b032d8 100644 --- a/libswfdec/swfdec_font.c +++ b/libswfdec/swfdec_font.c @@ -37,14 +37,23 @@ swfdec_font_dispose (GObject *object) SwfdecFont * font = SWFDEC_FONT (object); guint i; - for (i = 0; i < font->glyphs->len; i++) { - g_object_unref (g_array_index (font->glyphs, SwfdecFontEntry, i).shape); + if (font->glyphs) { + for (i = 0; i < font->glyphs->len; i++) { + g_object_unref (g_array_index (font->glyphs, SwfdecFontEntry, i).shape); + } + g_array_free (font->glyphs, TRUE); + font->glyphs = NULL; } - if (font->desc) + if (font->...
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
...12:46 2007 +0200 read font names sanely diff --git a/libswfdec/swfdec_font.c b/libswfdec/swfdec_font.c index 0aca1d5..c626104 100644 --- a/libswfdec/swfdec_font.c +++ b/libswfdec/swfdec_font.c @@ -93,6 +93,7 @@ swfdec_font_get_glyph (SwfdecFont * font return g_array_index (font->glyphs, SwfdecFontEntry, glyph).shape; } +#if 0 static char * convert_from_language (const char *s, SwfdecLanguage language) { @@ -120,6 +121,7 @@ convert_from_language (const char *s, Sw SWFDEC_ERROR ("given text is not in language %s", langcode); return ret; } +#endif int tag_func_define_fon...
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
...12:46 2007 +0200 read font names sanely diff --git a/libswfdec/swfdec_font.c b/libswfdec/swfdec_font.c index 0aca1d5..c626104 100644 --- a/libswfdec/swfdec_font.c +++ b/libswfdec/swfdec_font.c @@ -93,6 +93,7 @@ swfdec_font_get_glyph (SwfdecFont * font return g_array_index (font->glyphs, SwfdecFontEntry, glyph).shape; } +#if 0 static char * convert_from_language (const char *s, SwfdecLanguage language) { @@ -120,6 +121,7 @@ convert_from_language (const char *s, Sw SWFDEC_ERROR ("given text is not in language %s", langcode); return ret; } +#endif int tag_func_define_fon...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...-dump_text (SwfdecText *text) -{ - guint i; - gunichar2 uni[text->glyphs->len]; - char *s; - - for (i = 0; i < text->glyphs->len; i++) { - SwfdecTextGlyph *glyph = &g_array_index (text->glyphs, SwfdecTextGlyph, i); - uni[i] = g_array_index (glyph->font->glyphs, SwfdecFontEntry, glyph->glyph).value; - if (uni[i] == 0) - goto fallback; - } - s = g_utf16_to_utf8 (uni, text->glyphs->len, NULL, NULL, NULL); - if (s == NULL) - goto fallback; - g_print (" text: %s\n", s); - g_free (s); - return; - -fallback: - g_print (" %u characters...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
....1b032d8 100644 --- a/libswfdec/swfdec_font.c +++ b/libswfdec/swfdec_font.c @@ -37,14 +37,23 @@ swfdec_font_dispose (GObject *object) SwfdecFont * font = SWFDEC_FONT (object); guint i; - for (i = 0; i < font->glyphs->len; i++) { - g_object_unref (g_array_index (font->glyphs, SwfdecFontEntry, i).shape); + if (font->glyphs) { + for (i = 0; i < font->glyphs->len; i++) { + g_object_unref (g_array_index (font->glyphs, SwfdecFontEntry, i).shape); + } + g_array_free (font->glyphs, TRUE); + font->glyphs = NULL; } - if (font->desc) + if (font->...