gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...
Date: Tue, 13 Jun 2006 10:06:03 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/06/13 10:06:03

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: DefineEditTextTest.c Makefile.am 
Added files:
        testsuite/media: `Bitstream Vera Sans.COPYRIGHT' 
                         `Bitstream Vera Sans.fdb' README 

Log message:
                * testsuite/media/Bitstream Vera Sans.COPYRIGHT,
                testsuite/media/Bitstream Vera Sans.fdb: added
                fdb font from Ming project, for embedding in test
                units.
                * testsuite/media/README: info about media files
                (incomplete).
                * testsuite/misc-ming.all/Makefile.am,
                testsuite/misc-ming.all/DefineEditTextTest.c:
                updated DefineEditTextTest file to use embedded
                fonts, we can now reproduce bug #16637.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.402&r2=1.403
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/media/Bitstream%32Vera%32Sans.COPYRIGHT?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/media/Bitstream%32Vera%32Sans.fdb?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/media/README?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextTest.c?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.8&r2=1.9

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -b -r1.402 -r1.403
--- ChangeLog   12 Jun 2006 23:05:41 -0000      1.402
+++ ChangeLog   13 Jun 2006 10:06:03 -0000      1.403
@@ -1,3 +1,16 @@
+2006-06-13 Sandro Santilli <address@hidden>
+
+       * testsuite/media/Bitstream Vera Sans.COPYRIGHT,
+       testsuite/media/Bitstream Vera Sans.fdb: added
+       fdb font from Ming project, for embedding in test
+       units.
+       * testsuite/media/README: info about media files
+       (incomplete).
+       * testsuite/misc-ming.all/Makefile.am,
+       testsuite/misc-ming.all/DefineEditTextTest.c:
+       updated DefineEditTextTest file to use embedded
+       fonts, we can now reproduce bug #16637.
+
 2006-06-12 Sandro Santilli <address@hidden>
 
        * testsuite/misc-ming.all/DefineEditTextTest.c,

Index: testsuite/misc-ming.all/DefineEditTextTest.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextTest.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/DefineEditTextTest.c        12 Jun 2006 23:05:41 
-0000      1.1
+++ testsuite/misc-ming.all/DefineEditTextTest.c        13 Jun 2006 10:06:03 
-0000      1.2
@@ -37,7 +37,7 @@
 
 /*
  * Test DefineEditText tag.
- * Currently only uses "device" (browser) font
+ * Uses "embedded" font and defines a smaller rectangle then required.
  *
  * run as ./DefineEditTextTest
  */
@@ -58,20 +58,36 @@
 
        tf = newSWFTextField();
 
-       SWFTextField_addString(tf, text);
+       SWFTextField_setFont(tf, font);
+
+       /* setting flags seem unneeded */
+       /*SWFTextField_setFlags(tf, SWFTEXTFIELD_USEFONT|SWFTEXTFIELD_NOEDIT);*/
+       SWFTextField_addChars(tf, text);
 
-       SWFTextField_setFont(tf, (SWFBlock)font);
+       SWFTextField_addString(tf, text);
 
+       /*
+        * Bounds computed by Ming (if we omit the setBounds call)
+        * are 2640, 240. This means that we're shrinking the available
+        * space with this explicit setting. Gnash chokes in this case.
+        *
+        * Ref: https://savannah.gnu.org/bugs/?func=detailitem&item_id=16637.
+        */
        SWFTextField_setBounds(tf, 160, 338);
-       SWFTextField_setHeight(tf, 240);
-       SWFTextField_setColor(tf, 0x00, 0x00, 0x00, 0xff);
-       SWFTextField_setAlignment(tf, SWFTEXTFIELD_ALIGN_LEFT);
-       SWFTextField_setLeftMargin(tf, 0);
-       SWFTextField_setRightMargin(tf, 0);
-       SWFTextField_setIndentation(tf, 0);
-       SWFTextField_setLineSpacing(tf, 40);
-       SWFTextField_setLineSpacing(tf, 40);
-       /* SWFTextField_setName(tf, ""); */
+
+       /*
+        * The following settings (found in the reported SWF)
+        * are not needed to exploit the bug.
+        */
+ 
+       /*SWFTextField_setHeight(tf, 240);*/
+       /*SWFTextField_setColor(tf, 0x00, 0x00, 0x00, 0xff);*/
+       /*SWFTextField_setAlignment(tf, SWFTEXTFIELD_ALIGN_LEFT);*/
+       /*SWFTextField_setLeftMargin(tf, 0);*/
+       /*SWFTextField_setRightMargin(tf, 0);*/
+       /*SWFTextField_setIndentation(tf, 0);*/
+       /*SWFTextField_setLineSpacing(tf, 40);*/
+       /*SWFTextField_setLineSpacing(tf, 40);*/
 
        SWFMovie_add(mo, (SWFBlock)tf);
 }
@@ -80,6 +96,8 @@
 main(int argc, char** argv)
 {
        SWFMovie mo;
+       const char *srcdir=".";
+       char fdbfont[256];
 
        /*********************************************
         *
@@ -87,6 +105,15 @@
         *
         *********************************************/
 
+       if ( argc>1 ) srcdir=argv[1];
+       else
+       {
+               fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+               return 1;
+       }
+
+       sprintf(fdbfont, "%s/Bitstream Vera Sans.fdb", srcdir);
+
        puts("Setting things up");
 
        Ming_init();
@@ -103,9 +130,16 @@
         *
         *********************************************/
 
-       /* This is with browser font, not working */
+       /* This is with embedded fonts, not working */
+       {
+               FILE *font_file = fopen(fdbfont, "r");
+               if ( font_file == NULL )
        {
-               SWFBrowserFont bfont = newSWFBrowserFont("_sans");
+                       perror(fdbfont);
+                       exit(1);
+               }
+               /*SWFBrowserFont bfont = newSWFBrowserFont("_sans");*/
+               SWFFont bfont = loadSWFFontFromFile(font_file);
                add_text_field(mo, (SWFBlock)bfont, "Hello world");
        }
 

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- testsuite/misc-ming.all/Makefile.am 12 Jun 2006 23:05:41 -0000      1.8
+++ testsuite/misc-ming.all/Makefile.am 13 Jun 2006 10:06:03 -0000      1.9
@@ -90,7 +90,7 @@
        ./definebitsjpeg2 $(srcdir)/../media/lynch.jpg
 
 DefineEditTextTest.swf: DefineEditTextTest
-       ./DefineEditTextTest
+       ./DefineEditTextTest $(top_srcdir)/testsuite/media
 
 spritehier.swf: spritehier
        ./spritehier

Index: testsuite/media/Bitstream Vera Sans.COPYRIGHT
===================================================================
RCS file: testsuite/media/Bitstream Vera Sans.COPYRIGHT
diff -N testsuite/media/Bitstream Vera Sans.COPYRIGHT
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/media/Bitstream Vera Sans.COPYRIGHT       13 Jun 2006 10:06:03 
-0000      1.1
@@ -0,0 +1,124 @@
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+Copyright FAQ
+=============
+
+   1. I don't understand the resale restriction... What gives?
+
+      Bitstream is giving away these fonts, but wishes to ensure its
+      competitors can't just drop the fonts as is into a font sale system
+      and sell them as is. It seems fair that if Bitstream can't make money
+      from the Bitstream Vera fonts, their competitors should not be able to
+      do so either. You can sell the fonts as part of any software package,
+      however.
+
+   2. I want to package these fonts separately for distribution and
+      sale as part of a larger software package or system.  Can I do so?
+
+      Yes. A RPM or Debian package is a "larger software package" to begin 
+      with, and you aren't selling them independently by themselves. 
+      See 1. above.
+
+   3. Are derivative works allowed?
+      Yes!
+
+   4. Can I change or add to the font(s)?
+      Yes, but you must change the name(s) of the font(s).
+
+   5. Under what terms are derivative works allowed?
+
+      You must change the name(s) of the fonts. This is to ensure the
+      quality of the fonts, both to protect Bitstream and Gnome. We want to
+      ensure that if an application has opened a font specifically of these
+      names, it gets what it expects (though of course, using fontconfig,
+      substitutions could still could have occurred during font
+      opening). You must include the Bitstream copyright. Additional
+      copyrights can be added, as per copyright law. Happy Font Hacking!
+
+   6. If I have improvements for Bitstream Vera, is it possible they might get 
+       adopted in future versions?
+
+      Yes. The contract between the Gnome Foundation and Bitstream has
+      provisions for working with Bitstream to ensure quality additions to
+      the Bitstream Vera font family. Please contact us if you have such
+      additions. Note, that in general, we will want such additions for the
+      entire family, not just a single font, and that you'll have to keep
+      both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
+      glyphs to the font, they must be stylistically in keeping with Vera's
+      design. Vera cannot become a "ransom note" font. Jim Lyles will be
+      providing a document describing the design elements used in Vera, as a
+      guide and aid for people interested in contributing to Vera.
+
+   7. I want to sell a software package that uses these fonts: Can I do so?
+
+      Sure. Bundle the fonts with your software and sell your software
+      with the fonts. That is the intent of the copyright.
+
+   8. If applications have built the names "Bitstream Vera" into them, 
+      can I override this somehow to use fonts of my choosing?
+
+      This depends on exact details of the software. Most open source
+      systems and software (e.g., Gnome, KDE, etc.) are now converting to
+      use fontconfig (see www.fontconfig.org) to handle font configuration,
+      selection and substitution; it has provisions for overriding font
+      names and subsituting alternatives. An example is provided by the
+      supplied local.conf file, which chooses the family Bitstream Vera for
+      "sans", "serif" and "monospace".  Other software (e.g., the XFree86
+      core server) has other mechanisms for font substitution.
+

Index: testsuite/media/Bitstream Vera Sans.fdb
===================================================================
RCS file: testsuite/media/Bitstream Vera Sans.fdb
diff -N testsuite/media/Bitstream Vera Sans.fdb
Binary files /dev/null and /tmp/cvsChwGbw differ

Index: testsuite/media/README
===================================================================
RCS file: testsuite/media/README
diff -N testsuite/media/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/media/README      13 Jun 2006 10:06:03 -0000      1.1
@@ -0,0 +1,9 @@
+This directory contains "media" files, that is files for use
+by either Ming to embed in SWFs or to test gnash loading capabilities.
+
+
+Bitstream Vera Sans.fdb
+
+       Font Definition Block (fdb) for embedding in SWF.
+       Taken from http://ming.sf.net. Copyright is in
+       Bitstream.COPYRIGHT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]