gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/fontlib.h server/gnash.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/fontlib.h server/gnash.h
Date: Wed, 11 Jul 2007 02:58:00 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/11 02:58:00

Modified files:
        .              : ChangeLog 
        server         : fontlib.h gnash.h 

Log message:
                * server/: fontlib.h, gnash.h: move fontlib namespace
                  declaration where it belong.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3709&r2=1.3710
http://cvs.savannah.gnu.org/viewcvs/gnash/server/fontlib.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.99&r2=1.100

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3709
retrieving revision 1.3710
diff -u -b -r1.3709 -r1.3710
--- ChangeLog   11 Jul 2007 00:41:07 -0000      1.3709
+++ ChangeLog   11 Jul 2007 02:57:59 -0000      1.3710
@@ -1,5 +1,10 @@
 2007-07-10 Sandro Santilli <address@hidden>
 
+       * server/: fontlib.h, gnash.h: move fontlib namespace
+         declaration where it belong.
+
+2007-07-10 Sandro Santilli <address@hidden>
+
        * server/movie_root.cpp (display): fix calls to
          begin_display/end_display. Fixes playback of multi-level movies.
        * testsuite/swfdec/PASSING: three more tests succeed (name

Index: server/fontlib.h
===================================================================
RCS file: /sources/gnash/gnash/server/fontlib.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/fontlib.h    30 Nov 2006 20:14:46 -0000      1.5
+++ server/fontlib.h    11 Jul 2007 02:57:59 -0000      1.6
@@ -1,9 +1,20 @@
-// fontlib.h   -- Thatcher Ulrich <address@hidden> 2003
-
-// This source code has been donated to the Public Domain.  Do
-// whatever you want with it.
-
-// Internal interfaces to fontlib.
+// fontlib.h - Internal interfaces to fontlib, for Gnash.
+// 
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
 #ifndef GNASH_FONTLIB_H
@@ -11,15 +22,42 @@
 
 
 #include "types.h"
-class tu_file;
 
+// Forward declarations
+class tu_file;
 namespace gnash {
-
        class movie_def_impl;
        class texture_glyph;
+}
+
+namespace gnash {
+
+/// Library management
+//
+/// Font library control.  gnash is able to substitute fonts
+/// from the font library, in case a movie lacks glyphs for a
+/// declared font.  This would come into play since in recent
+/// versions of SWF, the movie is allowed to use "system
+/// fonts".  E.g. it can declare a font named "Arial", but not
+/// provide glyphs for it, and then the OS is expected to
+/// provide the font or a suitable replacement.
+///
+/// gnash does not try to handle this automatically; if your
+/// host program wants to emulate this behavior, it needs to
+/// load a movie that includes glyph info for the standard
+/// fonts you want, and then explicitly pull those fonts out of
+/// the movie_def and add them to fontlib.
+///
+/// @@ TODO: not all public APIs to enable this are in place
+/// yet!  Need md::get_font_count()/get_font(), and
+/// fontlib::add_font().
+///
+/// Otherwise, text written in a font with no glyphs just
+/// doesn't render at all.  (@@ Hm, should probably render it
+/// as boxes or something?)
+///
+namespace fontlib {
 
-       namespace fontlib
-       {
                // For adding fonts.
                void    add_font(font* f);
 
@@ -46,7 +84,31 @@
                // data, including glyph texture info.
                void    input_cached_data(tu_file* in, const 
std::vector<font*>& fonts, movie_definition* owner);
                
-       }       // end namespace fontlib
+       // Controls how large to render textured glyphs.
+       // Applies to fonts processed *after* this call only.
+       // The "nominal" size is perhaps around twice the
+       // average glyph height.
+       void    set_nominal_glyph_pixel_size(int pixel_size);
+
+       /// Clean up the font library
+       void    clear();
+
+       int     get_font_count();
+
+       font*   get_font(int index);
+
+       font*   get_font(const char* name);
+
+       const char*     get_font_name(const font* f);
+
+       // @@ also need to add color controls (or just set the diffuse color
+       // in the API?), perhaps matrix xform, and maybe spacing, etc.
+       //
+       // // For direct text rendering from the host app.
+       void    draw_string(const font* f, float x, float y, float size, const 
char* text);
+
+       
+}      // end namespace fontlib
 }      // end namespace gnash
 
 

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- server/gnash.h      1 Jul 2007 10:54:23 -0000       1.99
+++ server/gnash.h      11 Jul 2007 02:58:00 -0000      1.100
@@ -346,57 +346,6 @@
 ///
 DSOEXPORT void clear();
 
-//
-// Library management
-//
-       
-// Font library control.  gnash is able to substitute fonts
-// from the font library, in case a movie lacks glyphs for a
-// declared font.  This would come into play since in recent
-// versions of SWF, the movie is allowed to use "system
-// fonts".  E.g. it can declare a font named "Arial", but not
-// provide glyphs for it, and then the OS is expected to
-// provide the font or a suitable replacement.
-//
-// gnash does not try to handle this automatically; if your
-// host program wants to emulate this behavior, it needs to
-// load a movie that includes glyph info for the standard
-// fonts you want, and then explicitly pull those fonts out of
-// the movie_def and add them to fontlib.
-//
-// @@ TODO: not all public APIs to enable this are in place
-// yet!  Need md::get_font_count()/get_font(), and
-// fontlib::add_font().
-//
-// Otherwise, text written in a font with no glyphs just
-// doesn't render at all.  (@@ Hm, should probably render it
-// as boxes or something?)
-
-class font;    
-namespace fontlib
-{
-// Controls how large to render textured glyphs.
-// Applies to fonts processed *after* this call only.
-// The "nominal" size is perhaps around twice the
-// average glyph height.
-void   set_nominal_glyph_pixel_size(int pixel_size);
-
-// For accessing the fonts in the library.
-void   clear();
-int    get_font_count();
-font*  get_font(int index);
-font*  get_font(const char* name);
-const char*    get_font_name(const font* f);
-
-// @@ also need to add color controls (or just set the diffuse color
-// in the API?), perhaps matrix xform, and maybe spacing, etc.
-//
-// // For direct text rendering from the host app.
-void   draw_string(const font* f, float x, float y, float size, const char* 
text);
-// void        draw_string(const font* f, float x, float y, float size, const 
wchar_t* text);  // wide-char version
-}
-       
-       
 
 //
 // point: used by rect which is used by render_handler (otherwise would be in 
internal gnash_types.h)




reply via email to

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