[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: |
Wed, 13 Jun 2007 10:21:37 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/06/13 10:21:37
Modified files:
. : ChangeLog
server : font.cpp font.h
Log message:
* server/font.{cpp,h}: always maintain m_advance_table of the
same size of the other two glyph info containers (should
really
make a structure keeping all of them..). Fixes an
testInvariant
failure with the device font selector (see DeviceFonts page
on wiki).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3522&r2=1.3523
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.cpp?cvsroot=gnash&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.h?cvsroot=gnash&r1=1.21&r2=1.22
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3522
retrieving revision 1.3523
diff -u -b -r1.3522 -r1.3523
--- ChangeLog 13 Jun 2007 09:59:41 -0000 1.3522
+++ ChangeLog 13 Jun 2007 10:21:35 -0000 1.3523
@@ -1,5 +1,13 @@
2007-06-13 Sandro Santilli <address@hidden>
+ * server/font.{cpp,h}: always maintain m_advance_table of the
+ same size of the other two glyph info containers (should really
+ make a structure keeping all of them..). Fixes an testInvariant
+ failure with the device font selector (see DeviceFonts page
+ on wiki).
+
+2007-06-13 Sandro Santilli <address@hidden>
+
* configure.ac: look for libfontconfig
* Makefile.am: print fontconfig info on 'dumpconfig'
* server/FreetypeRasterizer.{cpp,h}: implement font name
Index: server/font.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/font.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- server/font.cpp 13 Jun 2007 02:24:42 -0000 1.35
+++ server/font.cpp 13 Jun 2007 10:21:36 -0000 1.36
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: font.cpp,v 1.35 2007/06/13 02:24:42 strk Exp $ */
+/* $Id: font.cpp,v 1.36 2007/06/13 10:21:36 strk Exp $ */
// Based on the public domain work of Thatcher Ulrich <address@hidden> 2003
@@ -53,7 +53,7 @@
font::~font()
{
- m_glyphs.resize(0);
+ m_glyphs.resize(0); // there's no need for this !
// Delete the name string.
delete [] m_name;
@@ -167,8 +167,10 @@
);
}
+ // TODO: use a structure to hold all of these ?
m_glyphs.resize(count);
- m_texture_glyphs.resize(m_glyphs.size());
+ m_texture_glyphs.resize(count);
+ m_advance_table.resize(count);
if (m->get_create_font_shapes() == DO_LOAD_FONT_SHAPES)
{
@@ -254,8 +256,10 @@
font_code_offset = in->read_u16();
}
+ // TODO: use a structure to hold all of these ?
m_glyphs.resize(glyph_count);
- m_texture_glyphs.resize(m_glyphs.size());
+ m_texture_glyphs.resize(glyph_count);
+ m_advance_table.resize(glyph_count);
if (m->get_create_font_shapes() == DO_LOAD_FONT_SHAPES)
{
@@ -314,7 +318,6 @@
m_leading = (float) in->read_s16();
// Advance table; i.e. how wide each character is.
- m_advance_table.resize(m_glyphs.size());
for (int i = 0, n = m_advance_table.size(); i < n; i++)
{
m_advance_table[i] = (float) in->read_s16();
Index: server/font.h
===================================================================
RCS file: /sources/gnash/gnash/server/font.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- server/font.h 12 Jun 2007 12:33:21 -0000 1.21
+++ server/font.h 13 Jun 2007 10:21:36 -0000 1.22
@@ -117,7 +117,16 @@
void testInvariant()
{
assert(m_texture_glyphs.size() == m_glyphs.size());
- assert(m_texture_glyphs.size() ==
m_advance_table.size());
+#ifndef NDEBUG
+ if (m_texture_glyphs.size() != m_advance_table.size())
+ {
+ log_error("Font '%s': Number of texture glyphs:
%lu, advance records: %lu",
+ m_name,
+ static_cast<unsigned
long>(m_texture_glyphs.size()),
+ static_cast<unsigned
long>(m_advance_table.size()));
+ abort();
+ }
+#endif
}
/// Get number of glyphs defined for this font
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/font.cpp server/font.h,
Sandro Santilli <=