[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/font.cpp server/font.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/font.cpp server/font.h |
Date: |
Mon, 14 Aug 2006 19:58:57 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/08/14 19:58:56
Modified files:
. : ChangeLog
server : font.cpp font.h
Log message:
* server/font.cpp, server/font.h: initial support for
DefineFontInfo2 tag, stricter use of SWF::tag_type type.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.639&r2=1.640
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.cpp?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.h?cvsroot=gnash&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.639
retrieving revision 1.640
diff -u -b -r1.639 -r1.640
--- ChangeLog 14 Aug 2006 16:49:38 -0000 1.639
+++ ChangeLog 14 Aug 2006 19:58:56 -0000 1.640
@@ -1,3 +1,8 @@
+2006-08-14 Sandro Santilli <address@hidden>
+
+ * server/font.cpp, server/font.h: initial support for
+ DefineFontInfo2 tag, stricter use of SWF::tag_type type.
+
2006-08-14 Rob Savoye <address@hidden>
* macros/atk.m4: Look for atk.h, not atkgl.h.
Index: server/font.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/font.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/font.cpp 8 Aug 2006 09:50:54 -0000 1.19
+++ server/font.cpp 14 Aug 2006 19:58:56 -0000 1.20
@@ -101,19 +101,19 @@
}
- void font::read(stream* in, int tag_type, movie_definition* m)
+ void font::read(stream* in, SWF::tag_type tag, movie_definition* m)
{
// No add_ref() here, to avoid cycle.
// m_owning_movie is our owner, so it has a ref to us.
m_owning_movie = m;
- if (tag_type == SWF::DEFINEFONT)
+ if (tag == SWF::DEFINEFONT)
{
readDefineFont(in, m);
}
else
{
- assert (tag_type == SWF::DEFINEFONT2);
+ assert (tag == SWF::DEFINEFONT2);
readDefineFont2(in, m);
}
}
@@ -333,16 +333,32 @@
// Read additional information about this font, from a
// DefineFontInfo tag. The caller has already read the tag
// type and font id.
- void font::read_font_info(stream* in)
+ void font::read_font_info(stream* in, SWF::tag_type tag,
movie_definition* m)
{
+ assert(tag == SWF::DEFINEFONTINFO || tag ==
SWF::DEFINEFONTINFO2);
+
+
+ if ( tag == SWF::DEFINEFONTINFO2 )
+ {
+ log_warning("DefineFontInfo2 partially implemented");
+ // See: SWFalexref/SWFalexref.html#tag_definefont2
+
+ }
+
delete [] m_name;
m_name = in->read_string_with_length();
unsigned char flags = in->read_u8();
+
+ // The following 3 flags are reserved
+ // for SWF6+
+
+ // this is font_info_small for SWF6 or up
m_unicode_chars = (flags & 0x20) != 0;
m_shift_jis_chars = (flags & 0x10) != 0;
m_ansi_chars = (flags & 0x08) != 0;
+
m_is_italic = (flags & 0x04) != 0;
m_is_bold = (flags & 0x02) != 0;
m_wide_codes = (flags & 0x01) != 0;
@@ -350,7 +366,6 @@
read_code_table(in);
}
-
void font::read_code_table(stream* in)
// Read the table that maps from glyph indices to character
// codes.
Index: server/font.h
===================================================================
RCS file: /sources/gnash/gnash/server/font.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/font.h 2 Aug 2006 01:40:33 -0000 1.11
+++ server/font.h 14 Aug 2006 19:58:56 -0000 1.12
@@ -14,6 +14,7 @@
#include "gnash.h"
#include "types.h"
#include "impl.h"
+#include "swf.h" // for tag_type definition
#include <map>
@@ -122,17 +123,17 @@
/// @param m the movie_definition containing this definition
/// (or "owning" this font)
///
- void read(stream* in, int tag_type, movie_definition* m);
+ void read(stream* in, SWF::tag_type tag, movie_definition*
m);
/// \brief
/// Read additional information about this font, from a
- /// DefineFontInfo tag.
+ /// DefineFontInfo or DefineFontInfo2 tag.
//
/// The caller has already read the tag type and font id.
///
/// @see SWF::define_font_info_loader
///
- void read_font_info(stream* in);
+ void read_font_info(stream* in, SWF::tag_type tag,
movie_definition* m);
/// Dump our cached data into the given stream.
void output_cached_data(tu_file* out, const cache_options&
options);