X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fexample%2Fdemofont.c;h=589de3d99bea684c43b0e66669857581594b6bcc;hb=ede90e3f60487332bcaede6d8f62ad0f3e0fb715;hp=8d859452806c67edf4dd4dafcc7f7b4b14869207;hpb=8e60ff96f0ed8f18ff198d414de1e3aeb1e5ee32;p=swftools.git diff --git a/lib/example/demofont.c b/lib/example/demofont.c index 8d85945..589de3d 100644 --- a/lib/example/demofont.c +++ b/lib/example/demofont.c @@ -6,9 +6,19 @@ Part of the swftools package. - This file is distributed under the GPL, see file COPYING for details + 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 2 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define addGlyph fn3711 @@ -109,12 +119,14 @@ SWFFONT * Font_Demo_Font(U16 id) f->id = id; f->version = 1; f->name = strdup("Demo Font"); - f->flags = 0x00; + f->style = 0x00; + f->encoding = 0x00; f->numchars = 6; f->maxascii = 256; f->glyph = (SWFGLYPH*)malloc(sizeof(SWFGLYPH)*6); f->glyph2ascii = (U16*)malloc(sizeof(U16)*6); f->ascii2glyph = (int*)malloc(sizeof(int)*256); + memset(f->ascii2glyph, -1, sizeof(int)*256); addGlyph(f, 0, 102, 64, &Glyphs_Demo_Font[0x0000], 872); // f addGlyph(f, 1, 108, 53, &Glyphs_Demo_Font[0x006d], 452); // l