Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

fontlist.h

Go to the documentation of this file.
00001 /*  $Id: fontlist.h,v 1.9 2000/12/11 22:15:36 dbryson Exp $
00002 **
00003 **  Copyright (c) 2000 Derry Bryson <derry@techass.com>
00004 **
00005 **  Description:
00006 **  
00007 **    Postscript Library
00008 **
00009 **
00010 **  License:
00011 **
00012 **    This library is free software; you can redistribute it and/or
00013 **    modify it under the terms of the GNU Lesser General Public
00014 **    License as published by the Free Software Foundation; either
00015 **    version 2.1 of the License, or (at your option) any later version.
00016 **
00017 **    This library is distributed in the hope that it will be useful,
00018 **    but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 **    Lesser General Public License for more details.
00021 **
00022 **    You should have received a copy of the GNU Lesser General Public
00023 **    License along with this library; if not, write to the Free Software
00024 **    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 **
00026 **
00027 **  Contact:
00028 **
00029 **      Mail:
00030 **
00031 **        Technology Associates, Inc.
00032 **        LIBPS Project
00033 **        1455 Deming Way #11
00034 **        Sparks, NV  89431
00035 **        USA
00036 **
00037 **      Email:
00038 **
00039 **        libps@techass.com
00040 **
00041 **      See our website at:
00042 **
00043 **        libps.sourceforge.net
00044 **
00045 */
00046 
00051 #ifndef INCLUDE_FONTLIST
00052 #define INCLUDE_FONTLIST
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 /******************************************************************************
00059 ****  DEFINES  ****************************************************************
00060 ******************************************************************************/
00061 
00062 #define PS_FONTLIST_FLAG_DEFAULT                0
00063 #define PS_FONTLIST_FLAG_INCLUDE_TRUETYPE       0x00000001 /* include truetype fonts */
00064 #define PS_FONTLIST_FLAG_INCLUDE_PSTYPE1        0x00000002 /* include postscript type1 fonts */
00065 #define PS_FONTLIST_FLAG_INCLUDE_AFM            0x00000004 /* include AFM files for printer */
00066 
00067 /******************************************************************************
00068 ****  TYPEDEFS  ***************************************************************
00069 ******************************************************************************/
00070 
00078 typedef struct psFontType
00079 {
00080   char
00081     *extension;
00082     
00083   int
00084     type;
00085 } PSFontType;
00091 /******************************************************************************
00092 ****  GLOBALS  ****************************************************************
00093 ******************************************************************************/
00094 
00095 extern PSFontType
00096   psFontTypes[];
00097 
00098 extern PSList
00099   *psFontList;
00100     
00101 /******************************************************************************
00102 ****  FUNCTION PROTOTYPES  ****************************************************
00103 ******************************************************************************/
00104 
00105 void psFontListSetPath(char *path);
00106 char *psFontListGetPath(void);
00107 void psFontListAppendPath(char *dir);
00108 void psFontListFreePath(void);
00109 
00110 int psFontListLoad(int flags, void (*statusFunc)(char* msg));
00111 void psFontListFree();
00112 PSFont* psFontListLookupByFontName(char *fontName);
00113 PSFont* psFontListLookupByFontFamily(char *fontFamily);
00114 PSFont* psFontListLookupByXLFD(char *xlfd);
00115 PSFont* psFontListLookupByFontFileName(char *fontFileName);
00116 char *psGetXFontFileName(char* XLFD, char **fileName);
00117 
00118 double psFontGetTextWidth(PSFont* font, char *text);
00119 
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123 
00124 #endif /* INCLUDE_FONTLIST */

Generated at Mon Dec 11 22:46:27 2000 for Postscript Utility Library by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000