[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22126] branches/blender2.5/blender/source /blender/blenlib: remove own postscript font loading code ( rely on freetype now)
Campbell Barton
ideasman42 at gmail.com
Sun Aug 2 00:33:18 CEST 2009
Revision: 22126
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22126
Author: campbellbarton
Date: 2009-08-02 00:33:18 +0200 (Sun, 02 Aug 2009)
Log Message:
-----------
remove own postscript font loading code (rely on freetype now)
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenlib/BLI_vfontdata.h
Removed Paths:
-------------
branches/blender2.5/blender/source/blender/blenlib/intern/psfont.c
Modified: branches/blender2.5/blender/source/blender/blenlib/BLI_vfontdata.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/BLI_vfontdata.h 2009-08-01 22:23:57 UTC (rev 22125)
+++ branches/blender2.5/blender/source/blender/blenlib/BLI_vfontdata.h 2009-08-01 22:33:18 UTC (rev 22126)
@@ -67,21 +67,8 @@
struct VFont *vfont;
};
-
/**
* Construct a new VFontData structure from
- * PostScript font data in a PackedFile.
- *
- * @param pf The font data.
- * @retval A new VFontData structure, or NULL
- * if unable to load.
- */
- VFontData*
-BLI_vfontdata_from_psfont(
- struct PackedFile *pf);
-
-/**
- * Construct a new VFontData structure from
* Freetype font data in a PackedFile.
*
* @param pf The font data.
Deleted: branches/blender2.5/blender/source/blender/blenlib/intern/psfont.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/intern/psfont.c 2009-08-01 22:23:57 UTC (rev 22125)
+++ branches/blender2.5/blender/source/blender/blenlib/intern/psfont.c 2009-08-01 22:33:18 UTC (rev 22126)
@@ -1,2126 +0,0 @@
-/**
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * 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.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- * fromtype1 - Convert an Adobe type 1 font into .of or .sf format.
- * Paul Haeberli - 1990
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_vfontdata.h"
-#include "BLI_blenlib.h"
-
-#include "DNA_packedFile_types.h"
-#include "DNA_curve_types.h"
-
-#include "BLO_sys_types.h" // for intptr_t support
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
- /* ObjFnt types */
-
-typedef struct chardesc {
- short movex, movey; /* advance */
- short llx, lly; /* bounding box */
- short urx, ury;
- short *data; /* char data */
- intptr_t datalen;
-} chardesc;
-
-typedef struct objfnt {
- struct objfnt *freeaddr; /* if freeaddr != 0, objfnt is one chunck */
- short type;
- short charmin, charmax;
- short my_nchars;
- short scale;
- chardesc *my_chars;
-} objfnt;
-
-#define OFMAGIC 0x93339333
-
-#define TM_TYPE 1
-#define PO_TYPE 2
-#define SP_TYPE 3
-
-/* ops for tmesh characters */
-
-#define TM_BGNTMESH (1)
-#define TM_SWAPTMESH (2)
-#define TM_ENDBGNTMESH (3)
-#define TM_RETENDTMESH (4)
-#define TM_RET (5)
-
-/* ops for poly characters */
-
-#define PO_BGNLOOP (1)
-#define PO_ENDBGNLOOP (2)
-#define PO_RETENDLOOP (3)
-#define PO_RET (4)
-
-/* ops for spline characters */
-
-#define SP_MOVETO (1)
-#define SP_LINETO (2)
-#define SP_CURVETO (3)
-#define SP_CLOSEPATH (4)
-#define SP_RETCLOSEPATH (5)
-#define SP_RET (6)
-
-
-#define MIN_ASCII ' '
-#define MAX_ASCII '~'
-#define NASCII (256 - 32)
-
-#define NOBBOX (30000)
-
-typedef struct pschar {
- char *name;
- int code;
- int prog;
-} pschar;
-
- /***/
-
-#define SKIP 4
-#define LINELEN 2048
-#define NOTHEX (100)
-#define MC1 52845
-#define MC2 22719
-#define MAXSUBRS 4000
-#define MAXCHARS 4000
-#define MAXTRIES 30
-
-/* some local thingies */
-static void rcurveto( int dx1, int dy1, int dx2, int dy2, int dx3, int dy3);
-static void makeobjfont(int savesplines);
-static void drawchar(int c);
-static void runprog(void);
-static int chartoindex(objfnt *fnt, int c);
-static short STDtoISO(short c);
-static char * newfgets(char * s, int n, PackedFile * pf);
-static int readfontmatrix(PackedFile * pf, float mat[2][2]);
-static char mdecrypt(char cipher);
-static void decryptall(void);
-static int decodetype1(PackedFile * pf, char *outname);
-static void fakefopen(void);
-static char *fakefread(int n);
-static void setcharlist(void);
-static void initpcstack(void);
-static char *poppc(void);
-static void initstack(void);
-static void push(int val);
-static int pop(void);
-static void initretstack(void);
-static void retpush(int val);
-static int retpop(void);
-static void subr1(void);
-static void subr2(void);
-static void subr0(void);
-static void append_poly_offset(short ofsx, short ofsy, short * data);
-static void append_spline_offset(short ofsx, short ofsy, short * data);
-static void setwidth(int w, int x);
-static void poly_beginchar(void);
-static void poly_endchar(void);
-static void poly_close(void);
-static void poly_pnt(float x, float y);
-static void spline_beginchar(void);
-static void spline_endchar(void);
-static void spline_close(void);
-static void spline_line(float x0, float y0, float x1, float y1);
-static void spline_curveto(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3);
-static void savestart(int x, int y);
-static void sbpoint( int x, int y);
-static void rmoveto( int x, int y);
-static void drawline(float x0, float y0, float x1, float y1, float dx0, float dy0, float dx1, float dy1);
-static void rlineto( int x, int y);
-static void closepath(void);
-static void bezadapt( float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float beztol);
-static void drawbez( float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3);
-static int docommand(int cmd);
-
-/* some local vars */
-static int startx, starty;
-static int curx, cury;
-static int nextx, nexty;
-static int delx, dely;
-static int started;
-
-
-/* postscript commands */
-#define HSTEM (1)
-#define VSTEM (3)
-#define VMOVETO (4)
-#define RLINETO (5)
-#define HLINETO (6)
-#define VLINETO (7)
-#define RRCURVETO (8)
-#define CLOSEPATH (9)
-#define CALLSUBR (10)
-#define RETURN (11)
-#define HSBW (13)
-#define ENDCHAR (14)
-#define RMOVETO (21)
-#define HMOVETO (22)
-#define VHCURVETO (30)
-#define HVCURVETO (31)
-#define DOTSECTION (256+0)
-#define VSTEM3 (256+1)
-#define HSTEM3 (256+2)
-#define SEAC (256+6)
-#define SBW (256+7)
-#define DIV (256+12)
-#define CALLOTHERSUBR (256+16)
-#define POP (256+17)
-#define SETCURRENTPOINT (256+33)
-#define WHAT0 (0)
-
-static char oneline[LINELEN];
-static objfnt *fnt;
-
-static unsigned short int mr;
-
-static char *bindat;
-static int datbytes;
-static int firsted;
-static short chardata[20000];
-static int nshorts;
-
-static int thecharwidth, thesidebearing;
-static int npnts, nloops;
-static int nvertpos;
-
-static int fakepos;
-static int fakemax;
-
-static float beztol = 100.0;
-
-/* extern: from libfm */
-
-static char *my_subrs[MAXSUBRS];
-static unsigned int my_sublen[MAXSUBRS];
-static char *my_chars[MAXCHARS];
-static unsigned int my_charlen[MAXCHARS];
-static char *my_charname[MAXCHARS];
-static int my_nsubrs, my_nchars;
-
-static short sidebearing[MAXCHARS];
-static char tok[LINELEN];
-static int sp_npnts, sp_nloops;
-
-/*
- * interpreter globals
- */
-
-
-static float mat[2][2];
-static char *pcstack[100];
-static char *pc;
-static int pcsp;
-static int coordpos;
-static int coordsave[7][2];
-static int incusp;
-static int retstack[1000];
-static int retsp;
-static int stack[1000];
-static int sp;
-static int savesplines = 1;
-
-static pschar ISOcharlist[NASCII] = {
- {"/space", 040, 0},
- {"/exclam", 041, 0},
- {"/quotedbl", 042, 0},
- {"/numbersign", 043, 0},
- {"/dollar", 044, 0},
- {"/percent", 045, 0},
- {"/ampersand", 046, 0},
- {"/quoteright", 047, 0},
-
- {"/parenleft", 050, 0},
- {"/parenright", 051, 0},
- {"/asterisk", 052, 0},
- {"/plus", 053, 0},
- {"/comma", 054, 0},
- {"/hyphen", 055, 0},
- {"/period", 056, 0},
- {"/slash", 057, 0},
-
- {"/zero", 060, 0},
- {"/one", 061, 0},
- {"/two", 062, 0},
- {"/three", 063, 0},
- {"/four", 064, 0},
- {"/five", 065, 0},
- {"/six", 066, 0},
- {"/seven", 067, 0},
-
- {"/eight", 070, 0},
- {"/nine", 071, 0},
- {"/colon", 072, 0},
- {"/semicolon", 073, 0},
- {"/less", 074, 0},
- {"/equal", 075, 0},
- {"/greater", 076, 0},
- {"/question", 077, 0},
-
- {"/at", 0100, 0},
- {"/A", 0101, 0},
- {"/B", 0102, 0},
- {"/C", 0103, 0},
- {"/D", 0104, 0},
- {"/E", 0105, 0},
- {"/F", 0106, 0},
- {"/G", 0107, 0},
-
- {"/H", 0110, 0},
- {"/I", 0111, 0},
- {"/J", 0112, 0},
- {"/K", 0113, 0},
- {"/L", 0114, 0},
- {"/M", 0115, 0},
- {"/N", 0116, 0},
- {"/O", 0117, 0},
-
- {"/P", 0120, 0},
- {"/Q", 0121, 0},
- {"/R", 0122, 0},
- {"/S", 0123, 0},
- {"/T", 0124, 0},
- {"/U", 0125, 0},
- {"/V", 0126, 0},
- {"/W", 0127, 0},
-
- {"/X", 0130, 0},
- {"/Y", 0131, 0},
- {"/Z", 0132, 0},
- {"/bracketleft", 0133, 0},
- {"/backslash", 0134, 0},
- {"/bracketright", 0135, 0},
- {"/asciicircum", 0136, 0},
- {"/underscore", 0137, 0},
-
- {"/quoteleft", 0140, 0},
- {"/a", 0141, 0},
- {"/b", 0142, 0},
- {"/c", 0143, 0},
- {"/d", 0144, 0},
- {"/e", 0145, 0},
- {"/f", 0146, 0},
- {"/g", 0147, 0},
-
- {"/h", 0150, 0},
- {"/i", 0151, 0},
- {"/j", 0152, 0},
- {"/k", 0153, 0},
- {"/l", 0154, 0},
- {"/m", 0155, 0},
- {"/n", 0156, 0},
- {"/o", 0157, 0},
-
- {"/p", 0160, 0},
- {"/q", 0161, 0},
- {"/r", 0162, 0},
- {"/s", 0163, 0},
- {"/t", 0164, 0},
- {"/u", 0165, 0},
- {"/v", 0166, 0},
- {"/w", 0167, 0},
-
- {"/x", 0170, 0},
- {"/y", 0171, 0},
- {"/z", 0172, 0},
- {"/braceleft", 0173, 0},
- {"/bar", 0174, 0},
- {"/braceright", 0175, 0},
- {"/asciitilde", 0176, 0},
- {"/", 0177, 0},
-
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list