Unverified Commit b964406b authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/libxfont-cleanup' into arctica-3.6.x

parents a77ca871 70b77a0f
......@@ -12,12 +12,10 @@ Build-Depends:
libjpeg-dev,
zlib1g-dev,
quilt (>= 0.46-7~),
libfontconfig1-dev,
libfontenc-dev,
libfreetype6-dev,
libxmltok1-dev,
libxml2-dev,
libxpm-dev,
libxfont-dev,
autoconf,
pkg-config,
x11proto-core-dev,
......
......@@ -64,7 +64,6 @@ override_dh_install:
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfont.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XI.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/fonts/
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/Xtrans/
dh_install --fail-missing
......
......@@ -15,9 +15,6 @@ RELEASE = XOrgReleaseString
#endif
#if !BuildServersOnly
#if BuildFonts
FONTSDIR = fonts
#endif
#ifndef Win32Architecture
#if BuildDocs
DOCSDIR = doc
......
......@@ -2119,16 +2119,6 @@ Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
LintLibReferences(varname,libname,libsource)
#endif
/*
* ProjectUnsharedFontLibReferences - unshared font libraries
*/
#ifndef ProjectUnsharedFontLibReferences
#define ProjectUnsharedFontLibReferences() @@\
DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(NX_Xfont)) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\
LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC))
#endif
/*
* SharedLibDependencies - shared library dependencies
*/
......@@ -2137,17 +2127,6 @@ LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC))
#endif
/*
* SharedFontLibReferences - shared font libraries
*/
#ifndef SharedFontLibReferences
#define SharedFontLibReferences() @@\
SOFONTREV = SharedFontRev @@\
DEPFONTLIB = SharedLibDependencies(NX_Xfont,$(FONTLIBSRC),SOFONTREV) @@\
FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lNX_Xfont @@\
LintLibReferences(XFONT,NX_Xfont,$(FONTLIBSRC))
#endif
/*
* SharedDSLibDependencies - shared library dependencies with data separation
*/
#ifndef SharedDSLibDependencies
......
......@@ -602,14 +602,6 @@ XCOMM deprecated; please strongly consider using vendor-supplied packages.
#ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */
#define GzipLibrary -lz
#endif
/* If the system has the Freetype2 library - if NO, the copy in extras is built */
#ifndef HasFreetype2
#define HasFreetype2 YES
#endif
/* If the system has the Fontconfig library - if NO, the copy in extras is built */
#ifndef HasFontconfig
#define HasFontconfig NO
#endif
/* If the system has the PNG library - if NO, xcursorgen is not built */
#ifndef HasLibpng
#define HasLibpng NO
......
......@@ -178,7 +178,6 @@ X11.tmpl provides defaults for the following variables:
BuildDBE build DOUBLE-BUFFER extension
BuildDmx build Distributed Multihead X server and extension
BuildDPMS build Display Power Management Signaling extension
BuildFonts build pcf fonts
BuildIncRoot relative path to location of headers in build
BuildIncTop path from build includes directory to top
BuildEVI build EVI server extension
......@@ -214,7 +213,6 @@ X11.tmpl provides defaults for the following variables:
DebugLibXag build libXag_d.a
DebugOldX build liboldX_d.a
DefaultCursorTheme name of default cursor theme
DefaultFSConfigFile default font server config file
DefaultFontPath default server font path
DefaultRGBDatabase default server rgb color database
DefaultSystemPath default system xdm PATH environment variable
......@@ -226,13 +224,7 @@ X11.tmpl provides defaults for the following variables:
DriverManSuffix man suffix for driver pages
ExtensionDefines -D's for universal extensions
ExtensionOSDefines -D's for additional extensions
FontCompilerFlags flags for bdftosnf
FontDefines -D's to turn on font options
FontDir directory in which to install fonts
FontFilters -D's to specify font conversion filters
FontOSDefines -D's for which fonts to support
ForceNormalLib force building of .a in addition to shared lib
GzipFontCompression boolean for using gzip instead of compress
HasXdmAuth boolean for using XDM-AUTHORIZATION-1;
needs Wraphelp.c, see Release Notes
InstallAppDefFiles install new app defaults files over old?
......
......@@ -91,9 +91,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#ifdef NXAgentServer
#define BuildRenderLibrary YES
#define SharedLibFreetype2 YES
#define NormalLibFreetype2 YES
#define FontLibSharedFreeType YES
#endif
/*
......@@ -241,101 +238,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* Speedo fonts have been disabled by default in this release.
* To re-enable support for Speedo fonts, uncomment this.
*
#define BuildSpeedo YES
*/
/*
* To disable support for CID fonts, uncomment this.
*
#define BuildCID NO
*/
/*
* To disable support for TrueType fonts, uncomment these.
*
#define BuildFreeType NO
*/
#define BuildFreeType NO
/*
* To set non-default build options for the underlying FreeType libraries,
* add them here and uncomment.
*
#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
*/
/*
* To build the FreeType libraries with the TrueType byte code interpreter
* enabled, uncomment this. Note that there are patent issues related to the
* TrueType byte code interpreter, and we only recommend you enabling this
* if you are sure that there are no legal impediments to you doing so. See
* <http://www.freetype.org/patents.html> for further information.
*
#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
*/
/*
* Do you want to Build Fonts (Usually you only want to build and install
* fonts once, if this is a first time install you will want to build the
* fonts)
*
#define BuildFonts NO
*/
#define BuildFonts NO
/*
* To not build/install the 75dpi fonts, uncomment the following
*
#define Build75DpiFonts NO
*/
/*
* To not build/install the 100dpi fonts, uncomment the following
*
#define Build100DpiFonts NO
*/
/*
* To build/install the Speedo fonts, uncomment the following
* (see setting above about Speedo support as well)
*
#define BuildSpeedoFonts YES
*/
/*
* To not build/install the Type1 fonts, uncomment the following
*
#define BuildType1Fonts NO
*/
/*
* To not build/install the CID fonts, uncomment the following
*
#define BuildCIDFonts NO
*/
/*
* To not build/install the True Type fonts, uncomment the following
*
#define BuildTrueTypeFonts NO
*/
/*
* To not build/install the Cyrillic fonts, uncomment the following
*
#define BuildCyrillicFonts NO
*/
/*
* To not install the local font directory, uncomment the following
*
#define MakeLocalFontDir NO
*/
/*
* Include True Type Fonts to default font path. It is safe to do
* this by default as NX intaller carries only misc and TTF in the
* basic set of fonts installed under Windows.
......@@ -368,7 +270,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*
#define InstallXinitConfig YES
#define InstallXdmConfig YES
#define InstallFSConfig YES
*/
/*
......@@ -592,21 +493,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* To link the X server with a dynamic version of the Xfont library,
* uncomment this.
*
#define XserverStaticFontLib NO
*/
#define XserverStaticFontLib YES
/*
* To enable binary compatibility with previous versions of the font
* encoding support, uncomment this.
*
#define FontencCompatibility YES
*/
/*
* To disable building XInput support, uncomment this
*
#define BuildXInputExt NO
......@@ -834,38 +720,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#define X86EMU_LIBPATH /usr/local/lib
*/
/*
* Most platforms default to using an already installed FreeType 2 library.
* To use the one included in this release instead, uncomment the following.
*
#define HasFreetype2 NO
*/
#define HasFreetype2 YES
/*
* To use a FreeType library already installed outside the default search
* paths, uncomment the following and set the path as needed.
*
#define HasFreetype2 YES
#define Freetype2Dir /usr/local
*/
/*
* Most platforms default to using an already installed Fontconfig library.
* To use the one included in this release instead, uncomment the following.
*
#define HasFontconfig NO
*/
#define HasFontconfig YES
/*
* To use a Fontconfig library already installed outside the default search
* paths, uncomment the following and set the path as needed.
#define HasFontconfig YES
#define FontconfigDir /usr/local
*/
/*
* Most platforms default to using an already installed Expat library.
......@@ -912,9 +766,5 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#define BuildXaw7 NO
#define BuildRman NO
#define BuildFontEncLib NO
#define BuildXcursorLibrary NO
#define BuildXftLibrary NO
#define BuildXft1Library NO
#define SharedLibFont NO
#define BuildLoadableXlibI18n NO
......@@ -116,7 +116,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class
# define SharedLibXdmGreet NO
# define LinkGLToUsrInclude NO
# define LinkGLToUsrLib NO
# define SharedLibFont NO
# define SharedLibGlu YES
# define NormalLibGlu YES
# define FSUseSyslog YES
......@@ -156,9 +155,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class
# define BuildRman NO
# define BuildHtmlManPages NO
/* we build-depend on libfreetype6-dev (FreeType 2.x) */
# define BuildFreetype2Library NO
# define HasFreetype2 YES
/* m68k has no 2.4 kernel yet */
# ifndef Mc68020Architecture
# define HasLinuxInput YES
......@@ -539,10 +535,6 @@ InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class
# define HasExpat YES
#endif
#ifndef HasFreetype2
# define HasFreetype2 YES
#endif
#define AvoidNullMakeCommand YES
#ifndef DebuggableLibraries
#define DebuggableLibraries NO
......
......@@ -139,103 +139,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* To disable support for Speedo fonts, uncomment this.
*
#define BuildSpeedo NO
*/
/*
* To disable support for Type1 fonts, uncomment this.
*
#define BuildType1 NO
*/
/*
* To disable support for CID fonts, uncomment this.
*
#define BuildCID NO
*/
/*
* To disable support for TrueType fonts, uncomment these.
*
#define BuildFreeType NO
*/
/*
* To set non-default build options for the underlying FreeType libraries,
* add them here and uncomment.
*
#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
*/
/*
* To build the FreeType libraries with the TrueType byte code interpreter
* enabled, uncomment this. Note that there are patent issues related to the
* TrueType byte code interpreter, and we only recommend you enabling this
* if you are sure that there are no legal impediments to you doing so. See
* <http://www.freetype.org/patents.html> for further information.
*
#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
*/
/*
* Do you want to Build Fonts (Usually you only want to build and install
* fonts once, if this is a first time install you will want to build the
* fonts)
*
#define BuildFonts NO
*/
/*
* To not build/install the 75dpi fonts, uncomment the following
*
#define Build75DpiFonts NO
*/
/*
* To not build/install the 100dpi fonts, uncomment the following
*
#define Build100DpiFonts NO
*/
/*
* To not build/install the Speedo fonts, uncomment the following
*
#define BuildSpeedoFonts NO
*/
/*
* To not build/install the Type1 fonts, uncomment the following
*
#define BuildType1Fonts NO
*/
/*
* To not build/install the CID fonts, uncomment the following
*
#define BuildCIDFonts NO
*/
/*
* To not build/install the True Type fonts, uncomment the following
*
#define BuildTrueTypeFonts NO
*/
/*
* To not build/install the Cyrillic fonts, uncomment the following
*
#define BuildCyrillicFonts NO
*/
/*
* To not install the local font directory, uncomment the following
*
#define MakeLocalFontDir NO
*/
/*
* To build only the servers with a cut-down source tree, uncomment
* this.
*
......@@ -456,20 +359,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* To link the X server with a dynamic version of the Xfont library,
* uncomment this.
*
#define XserverStaticFontLib NO
*/
/*
* To enable binary compatibility with previous versions of the font
* encoding support, uncomment this.
*
#define FontencCompatibility YES
*/
/*
* To disable building XInput support, uncomment this
*
#define BuildXInputExt NO
......
......@@ -1684,50 +1684,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
#endif
/*
* Include fonts support
*/
#ifndef BuildSpeedo
# define BuildSpeedo NO
#endif
#ifndef BuildType1
# define BuildType1 NO
#endif
#ifndef BuildCID
# define BuildCID YES
#endif
#ifndef BuildFreeType
# define BuildFreeType YES
#endif
/*
* By default, build all of the fonts.
*/
#ifndef Build75DpiFonts
# define Build75DpiFonts YES
#endif
#ifndef Build100DpiFonts
# define Build100DpiFonts YES
#endif
#ifndef BuildSpeedoFonts
# define BuildSpeedoFonts NO
#endif
#ifndef BuildType1Fonts
# define BuildType1Fonts YES
#endif
#ifndef BuildCIDFonts
# define BuildCIDFonts YES
#endif
#ifndef BuildTrueTypeFonts
# define BuildTrueTypeFonts YES
#endif
#ifndef BuildCyrillicFonts
# define BuildCyrillicFonts YES
#endif
/*
* Build scanpci?
*/
#ifndef SystemV
......@@ -1748,14 +1704,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# endif
#endif
#ifndef CompressAllFonts
# define CompressAllFonts YES
#endif
#ifndef GzipFontCompression
# define GzipFontCompression YES
#endif
/* Disable stripping installed programs for this release. */
#ifndef StripInstalledPrograms
# define StripInstalledPrograms NO
......
......@@ -1248,50 +1248,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
#endif
/*
* Include fonts support
*/
#ifndef BuildSpeedo
# define BuildSpeedo NO
#endif
#ifndef BuildType1
# define BuildType1 NO
#endif
#ifndef BuildCID
# define BuildCID YES
#endif
#ifndef BuildFreeType
# define BuildFreeType YES
#endif
/*
* By default, build all of the fonts.
*/
#ifndef Build75DpiFonts
# define Build75DpiFonts YES
#endif
#ifndef Build100DpiFonts
# define Build100DpiFonts YES
#endif
#ifndef BuildSpeedoFonts
# define BuildSpeedoFonts NO
#endif
#ifndef BuildType1Fonts
# define BuildType1Fonts YES
#endif
#ifndef BuildCIDFonts
# define BuildCIDFonts YES
#endif
#ifndef BuildTrueTypeFonts
# define BuildTrueTypeFonts YES
#endif
#ifndef BuildCyrillicFonts
# define BuildCyrillicFonts YES
#endif
/*
* Build scanpci?
*/
#ifndef SystemV
......@@ -1312,14 +1268,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# endif
#endif
#ifndef CompressAllFonts
# define CompressAllFonts YES
#endif
#ifndef GzipFontCompression
# define GzipFontCompression YES
#endif
/* Disable stripping installed programs for this release. */
#ifndef StripInstalledPrograms
# define StripInstalledPrograms NO
......
......@@ -153,99 +153,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* Speedo fonts have been disabled by default in this release.
* To re-enable support for Speedo fonts, uncomment this.
*
#define BuildSpeedo YES
*/
/*
* To disable support for CID fonts, uncomment this.
*
#define BuildCID NO
*/
/*
* To disable support for TrueType fonts, uncomment these.
*
#define BuildFreeType NO
*/
/*
* To set non-default build options for the underlying FreeType libraries,
* add them here and uncomment.
*
#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
*/
/*
* To build the FreeType libraries with the TrueType byte code interpreter
* enabled, uncomment this. Note that there are patent issues related to the
* TrueType byte code interpreter, and we only recommend you enabling this
* if you are sure that there are no legal impediments to you doing so. See
* <http://www.freetype.org/patents.html> for further information.
*
#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
*/
/*
* Do you want to Build Fonts (Usually you only want to build and install
* fonts once, if this is a first time install you will want to build the
* fonts)
*
#define BuildFonts NO
*/
/*
* To not build/install the 75dpi fonts, uncomment the following
*
#define Build75DpiFonts NO
*/
/*
* To not build/install the 100dpi fonts, uncomment the following
*
#define Build100DpiFonts NO
*/
/*
* To build/install the Speedo fonts, uncomment the following
* (see setting above about Speedo support as well)
*
#define BuildSpeedoFonts YES
*/
/*
* To not build/install the Type1 fonts, uncomment the following
*
#define BuildType1Fonts NO
*/
/*
* To not build/install the CID fonts, uncomment the following
*
#define BuildCIDFonts NO
*/
/*
* To not build/install the True Type fonts, uncomment the following
*
#define BuildTrueTypeFonts NO
*/
/*
* To not build/install the Cyrillic fonts, uncomment the following
*
#define BuildCyrillicFonts NO
*/
/*
* To not install the local font directory, uncomment the following
*
#define MakeLocalFontDir NO
*/
/*
* To build only the servers with a cut-down source tree, uncomment
* this.
*
......@@ -464,20 +371,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
*/
/*
* To link the X server with a dynamic version of the Xfont library,
* uncomment this.
*
#define XserverStaticFontLib NO
*/
/*
* To enable binary compatibility with previous versions of the font
* encoding support, uncomment this.
*
#define FontencCompatibility YES
*/
/*
* To disable building XInput support, uncomment this
*
#define BuildXInputExt NO
......@@ -669,36 +562,6 @@ XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
#define X86EMU_LIBPATH /usr/local/lib
*/
/*
* Most platforms default to using an already installed FreeType 2 library.
* To use the one included in this release instead, uncomment the following.
*
#define HasFreetype2 NO
*/
/*
* To use a FreeType library already installed outside the default search
* paths, uncomment the following and set the path as needed.
*
#define HasFreetype2 YES
#define Freetype2Dir /usr/local
*/
/*
* Most platforms default to using an already installed Fontconfig library.
* To use the one included in this release instead, uncomment the following.
*
#define HasFontconfig NO
*/
/*
* To use a Fontconfig library already installed outside the default search
* paths, uncomment the following and set the path as needed.
#define HasFontconfig YES
#define FontconfigDir /usr/local
*/
/*
* Most platforms default to using an already installed Expat library.
......
......@@ -15,7 +15,7 @@ GLXDIR = GL
DPSDIR = DPS
#endif
SUBDIRS = bitmaps extensions fonts $(GLXDIR) $(DPSDIR)
SUBDIRS = bitmaps extensions $(GLXDIR) $(DPSDIR)
#ifdef Win32Architecture
EXTRA_HEADERS = Xw32defs.h Xwinsock.h Xwindows.h
......
......@@ -39,7 +39,7 @@ FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h
#if BuildXinerama || BuildXineramaLibrary
XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h
#endif
#if BuildRender || BuildXftLibrary
#if BuildRender
RENDERHEADERS = render.h renderproto.h
#endif
#if BuildXfixes || BuildXfixesLibrary
......
/* $Xorg: FS.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Network Computing Devices or Digital
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission.
* Network Computing Devices and Digital make no representations
* about the suitability of this software for any purpose. It is provided
* "as is" without express or implied warranty.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
* OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
/*
Portions Copyright 1987, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/fonts/FS.h,v 1.9 2003/07/09 15:27:28 tsi Exp $ */
#ifndef _FS_H_
#define _FS_H_
#include <X11/Xdefs.h>
#include <X11/fonts/fsmasks.h>
#define FS_PROTOCOL 2
#define FS_PROTOCOL_MINOR 0
#ifndef X_PROTOCOL
/* protocol familes */
#define FamilyInternet 0
#define FamilyDECnet 1
#define FamilyChaos 2
#define FamilyInternet6 6
typedef unsigned int FSDrawDirection;
#endif
#ifndef None
#define None 0L
#endif
#define LeftToRightDrawDirection 0
#define RightToLeftDrawDirection 1
/* font info flags */
#define FontInfoAllCharsExist (1L << 0)
#define FontInfoInkInside (1L << 1)
#define FontInfoHorizontalOverlap (1L << 2)
/* auth status flags */
#define AuthSuccess 0
#define AuthContinue 1
#define AuthBusy 2
#define AuthDenied 3
/* property types */
#define PropTypeString 0
#define PropTypeUnsigned 1
#define PropTypeSigned 2
#ifndef LSBFirst
/* byte order */
#define LSBFirst 0
#define MSBFirst 1
#endif
/* event masks */
#define CatalogueChangeNotifyMask (1L << 0)
#define FontChangeNotifyMask (1L << 1)
/* errors */
#define FSSuccess -1
#define FSBadRequest 0
#define FSBadFormat 1
#define FSBadFont 2
#define FSBadRange 3
#define FSBadEventMask 4
#define FSBadAccessContext 5
#define FSBadIDChoice 6
#define FSBadName 7
#define FSBadResolution 8
#define FSBadAlloc 9
#define FSBadLength 10
#define FSBadImplementation 11
#define FirstExtensionError 128
#define LastExtensionError 255
/* events */
#define KeepAlive 0
#define CatalogueChangeNotify 1
#define FontChangeNotify 2
#define FSLASTEvent 3
#endif /* _FS_H_ */
XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $
XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.7 2001/01/17 17:53:26 dawes Exp $
HEADERS = FS.h FSproto.h font.h fontstruct.h fsmasks.h
all::
BuildIncludes($(HEADERS),X11/fonts,../..)
#if BuildLibraries
InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS))
#endif
InstallDriverSDKNonExecFile(font.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(fontproto.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(fontstruct.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(fsmasks.h,$(DRIVERSDKINCLUDEDIR))
/* $Xorg: font.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/fonts/font.h,v 3.4 2000/11/27 00:10:02 dawes Exp $ */
/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */
#ifndef FONT_H
#define FONT_H
#ifndef BitmapFormatByteOrderMask
#include "fsmasks.h"
#endif
/* data structures */
#ifndef _XTYPEDEF_FONTPTR
typedef struct _Font *FontPtr;
#define _XTYPEDEF_FONTPTR
#endif
typedef struct _FontInfo *FontInfoPtr;
typedef struct _FontProp *FontPropPtr;
typedef struct _ExtentInfo *ExtentInfoPtr;
typedef struct _FontPathElement *FontPathElementPtr;
#ifndef _XTYPEDEF_CHARINFOPTR
typedef struct _CharInfo *CharInfoPtr;
#define _XTYPEDEF_CHARINFOPTR
#endif
typedef struct _FontNames *FontNamesPtr;
typedef struct _FontResolution *FontResolutionPtr;
#define NullCharInfo ((CharInfoPtr) 0)
#define NullFont ((FontPtr) 0)
#define NullFontInfo ((FontInfoPtr) 0)
/* draw direction */
#define LeftToRight 0
#define RightToLeft 1
#define BottomToTop 2
#define TopToBottom 3
typedef int DrawDirection;
#define NO_SUCH_CHAR -1
#define FontAliasType 0x1000
#define AllocError 80
#define StillWorking 81
#define FontNameAlias 82
#define BadFontName 83
#define Suspended 84
#define Successful 85
#define BadFontPath 86
#define BadCharRange 87
#define BadFontFormat 88
#define FPEResetFailed 89 /* for when an FPE reset won't work */
/* OpenFont flags */
#define FontLoadInfo 0x0001
#define FontLoadProps 0x0002
#define FontLoadMetrics 0x0004
#define FontLoadBitmaps 0x0008
#define FontLoadAll 0x000f
#define FontOpenSync 0x0010
#define FontReopen 0x0020
/* Query flags */
#define LoadAll 0x1
#define FinishRamge 0x2
#define EightBitFont 0x4
#define SixteenBitFont 0x8
/* Glyph Caching Modes */
#define CACHING_OFF 0
#define CACHE_16_BIT_GLYPHS 1
#define CACHE_ALL_GLYPHS 2
#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
extern int glyphCachingMode;
struct _Client;
extern int StartListFontsWithInfo(
struct _Client * /*client*/,
int /*length*/,
unsigned char * /*pattern*/,
int /*max_names*/
);
extern FontNamesPtr MakeFontNamesRecord(
unsigned /* size */
);
extern void FreeFontNames(
FontNamesPtr /* pFN*/
);
extern int AddFontNamesName(
FontNamesPtr /* names */,
char * /* name */,
int /* length */
);
#if 0 /* unused */
extern int FontToFSError();
extern FontResolutionPtr GetClientResolution();
#endif
typedef struct _FontPatternCache *FontPatternCachePtr;
extern FontPatternCachePtr MakeFontPatternCache (
void
);
extern void FreeFontPatternCache (
FontPatternCachePtr /* cache */
);
extern void EmptyFontPatternCache (
FontPatternCachePtr /* cache */
);
extern void CacheFontPattern (
FontPatternCachePtr /* cache */,
char * /* pattern */,
int /* patlen */,
FontPtr /* pFont */
);
extern FontResolutionPtr GetClientResolutions(
int * /* num */
);
extern FontPtr FindCachedFontPattern (
FontPatternCachePtr /* cache */,
char * /* pattern */,
int /* patlen */
);
extern void RemoveCachedFontPattern (
FontPatternCachePtr /* cache */,
FontPtr /* pFont */
);
typedef enum {
Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
} FontEncoding;
#endif /* FONT_H */
/* $XFree86: xc/include/fonts/fontproto.h,v 1.2 1999/09/04 09:14:08 dawes Exp $ */
/***********************************************************
Copyright (c) 1999 The XFree86 Project Inc.
All Rights Reserved.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The XFree86 Project
Inc. shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization from The XFree86 Project Inc..
*/
#ifndef _FONTPROTO_H
#define _FONTPROTO_H
/* Externally provided functions required by libXfont */
extern int RegisterFPEFunctions ( NameCheckFunc name_func,
InitFpeFunc init_func,
FreeFpeFunc free_func,
ResetFpeFunc reset_func,
OpenFontFunc open_func,
CloseFontFunc close_func,
ListFontsFunc list_func,
StartLfwiFunc start_lfwi_func,
NextLfwiFunc next_lfwi_func,
WakeupFpeFunc wakeup_func,
ClientDiedFunc client_died,
LoadGlyphsFunc load_glyphs,
StartLaFunc start_list_alias_func,
NextLaFunc next_list_alias_func,
SetPathFunc set_path_func);
extern int GetDefaultPointSize ( void );
extern int init_fs_handlers ( FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler);
extern void remove_fs_handlers ( FontPathElementPtr fpe,
BlockHandlerProcPtr block_handler,
Bool all );
extern int client_auth_generation ( ClientPtr client );
#ifndef ___CLIENTSIGNAL_DEFINED___
#define ___CLIENTSIGNAL_DEFINED___
extern Bool ClientSignal ( ClientPtr client );
#endif /* ___CLIENTSIGNAL_DEFINED___ */
extern void DeleteFontClientID ( Font id );
extern Font GetNewFontClientID ( void );
extern int StoreFontClientFont ( FontPtr pfont, Font id );
extern void FontFileRegisterFpeFunctions ( void );
extern void FontFileCheckRegisterFpeFunctions ( void );
extern Bool XpClientIsBitmapClient ( ClientPtr client );
extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe );
extern void PrinterFontRegisterFpeFunctions ( void );
extern void fs_register_fpe_functions ( void );
extern void check_fs_register_fpe_functions ( void );
/* util/private.c */
extern FontPtr CreateFontRec (void);
extern void DestroyFontRec (FontPtr font);
extern Bool _FontSetNewPrivate (FontPtr /* pFont */,
int /* n */,
pointer /* ptr */);
extern int AllocateFontPrivateIndex (void);
extern void ResetFontPrivateIndex (void);
/* Type1/t1funcs.c */
extern void Type1RegisterFontFileFunctions(void);
extern void CIDRegisterFontFileFunctions(void);
/* Speedo/spfuncs.c */
extern void SpeedoRegisterFontFileFunctions(void);
/* FreeType/ftfuncs.c */
extern void FreeTypeRegisterFontFileFunctions(void);
#endif
/* $Xorg: fontstruct.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/fonts/fontstruct.h,v 3.3 1999/08/21 13:47:34 dawes Exp $ */
#ifndef FONTSTR_H
#define FONTSTR_H
#include <X11/Xproto.h>
#include "font.h"
#include <X11/Xfuncproto.h>
#include <X11/Xdefs.h>
/*
* This version of the server font data strucutre is only for describing
* the in memory data structure. The file structure is not necessarily a
* copy of this. That is up to the compiler and the OS layer font loading
* machinery.
*/
#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */
typedef struct _FontProp {
long name;
long value; /* assumes ATOM is not larger than INT32 */
} FontPropRec;
typedef struct _FontResolution {
unsigned short x_resolution;
unsigned short y_resolution;
unsigned short point_size;
} FontResolutionRec;
typedef struct _ExtentInfo {
DrawDirection drawDirection;
int fontAscent;
int fontDescent;
int overallAscent;
int overallDescent;
int overallWidth;
int overallLeft;
int overallRight;
} ExtentInfoRec;
typedef struct _CharInfo {
xCharInfo metrics; /* info preformatted for Queries */
char *bits; /* pointer to glyph image */
} CharInfoRec;
/*
* Font is created at font load time. It is specific to a single encoding.
* e.g. not all of the glyphs in a font may be part of a single encoding.
*/
typedef struct _FontInfo {
unsigned short firstCol;
unsigned short lastCol;
unsigned short firstRow;
unsigned short lastRow;
unsigned short defaultCh;
unsigned int noOverlap:1;
unsigned int terminalFont:1;
unsigned int constantMetrics:1;
unsigned int constantWidth:1;
unsigned int inkInside:1;
unsigned int inkMetrics:1;
unsigned int allExist:1;
unsigned int drawDirection:2;
unsigned int cachable:1;
unsigned int anamorphic:1;
short maxOverlap;
short pad;
xCharInfo maxbounds;
xCharInfo minbounds;
xCharInfo ink_maxbounds;
xCharInfo ink_minbounds;
short fontAscent;
short fontDescent;
int nprops;
FontPropPtr props;
char *isStringProp;
} FontInfoRec;
typedef struct _Font {
int refcnt;
FontInfoRec info;
char bit;
char byte;
char glyph;
char scan;
fsBitmapFormat format;
int (*get_glyphs) (FontPtr /* font */,
unsigned long /* count */,
unsigned char * /* chars */,
FontEncoding /* encoding */,
unsigned long * /* count */,
CharInfoPtr * /* glyphs */);
int (*get_metrics) (FontPtr /* font */,
unsigned long /* count */,
unsigned char * /* chars */,
FontEncoding /* encoding */,
unsigned long * /* count */,
xCharInfo ** /* glyphs */);
void (*unload_font) (FontPtr /* font */);
void (*unload_glyphs) (FontPtr /* font */);
FontPathElementPtr fpe;
pointer svrPrivate;
pointer fontPrivate;
pointer fpePrivate;
int maxPrivate;
pointer *devPrivates;
} FontRec;
#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \
(pFont)->devPrivates[n])
#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
_FontSetNewPrivate (pFont, n, ptr) : \
((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE))
typedef struct _FontNames {
int nnames;
int size;
int *length;
char **names;
} FontNamesRec;
/* External view of font paths */
typedef struct _FontPathElement {
int name_length;
char *name;
int type;
int refcount;
pointer private;
} FontPathElementRec;
typedef Bool (*NameCheckFunc) (char *name);
typedef int (*InitFpeFunc) (FontPathElementPtr fpe);
typedef int (*FreeFpeFunc) (FontPathElementPtr fpe);
typedef int (*ResetFpeFunc) (FontPathElementPtr fpe);
typedef int (*OpenFontFunc) ( pointer client,
FontPathElementPtr fpe,
Mask flags,
char* name,
int namelen,
fsBitmapFormat format,
fsBitmapFormatMask fmask,
XID id,
FontPtr* pFont,
char** aliasName,
FontPtr non_cachable_font);
typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont);
typedef int (*ListFontsFunc) (pointer client,
FontPathElementPtr fpe,
char* pat,
int len,
int max,
FontNamesPtr names);
typedef int (*StartLfwiFunc) (pointer client,
FontPathElementPtr fpe,
char* pat,
int len,
int max,
pointer* privatep);
typedef int (*NextLfwiFunc) (pointer client,
FontPathElementPtr fpe,
char** name,
int* namelen,
FontInfoPtr* info,
int* numFonts,
pointer private);
typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe,
unsigned long* LastSelectMask);
typedef void (*ClientDiedFunc) (pointer client,
FontPathElementPtr fpe);
typedef int (*LoadGlyphsFunc) (pointer client,
FontPtr pfont,
Bool range_flag,
unsigned int nchars,
int item_size,
unsigned char* data);
typedef int (*StartLaFunc) (pointer client,
FontPathElementPtr fpe,
char* pat,
int len,
int max,
pointer* privatep);
typedef int (*NextLaFunc) (pointer client,
FontPathElementPtr fpe,
char** namep,
int* namelenp,
char** resolvedp,
int* resolvedlenp,
pointer private);
typedef void (*SetPathFunc)(void);
typedef struct _FPEFunctions {
NameCheckFunc name_check;
InitFpeFunc init_fpe;
ResetFpeFunc reset_fpe;
FreeFpeFunc free_fpe;
OpenFontFunc open_font;
CloseFontFunc close_font;
ListFontsFunc list_fonts;
StartLaFunc start_list_fonts_and_aliases;
NextLaFunc list_next_font_or_alias;
StartLfwiFunc start_list_fonts_with_info;
NextLfwiFunc list_next_font_with_info;
WakeupFpeFunc wakeup_fpe;
ClientDiedFunc client_died;
/* for load_glyphs, range_flag = 0 ->
nchars = # of characters in data
item_size = bytes/char
data = list of characters
range_flag = 1 ->
nchars = # of fsChar2b's in data
item_size is ignored
data = list of fsChar2b's */
LoadGlyphsFunc load_glyphs;
SetPathFunc set_path_hook;
} FPEFunctionsRec, FPEFunctions;
/*
* Various macros for computing values based on contents of
* the above structures
*/
#define GLYPHWIDTHPIXELS(pci) \
((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
#define GLYPHHEIGHTPIXELS(pci) \
((pci)->metrics.ascent + (pci)->metrics.descent)
#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7)
#define BYTES_PER_ROW(bits, nbytes) \
((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \
:(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \
:(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \
:(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
: 0)
#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \
BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad))
/*
* Macros for computing different bounding boxes for fonts; from
* the font protocol
*/
#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \
(pi)->fontAscent : (pi)->ink_maxbounds.ascent)
#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \
(pi)->fontDescent : (pi)->ink_maxbounds.descent)
#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi))
#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \
(pi)->ink_minbounds.leftSideBearing : 0)
#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \
(pi)->ink_maxbounds.characterWidth ? \
(pi)->ink_maxbounds.rightSideBearing : \
(pi)->ink_maxbounds.characterWidth)
#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi))
#include "fontproto.h"
#endif /* FONTSTR_H */
/* $Xorg: fsmasks.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Network Computing Devices or Digital
* not be used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission.
* Network Computing Devices and Digital make no representations
* about the suitability of this software for any purpose. It is provided
* "as is" without express or implied warranty.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES
* OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
/*
Portions Copyright 1987, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/*
* masks & values used by the font lib and the font server
*/
#ifndef _FSMASKS_H_
#define _FSMASKS_H_
#include <X11/Xmd.h>
/* font format macros */
#define BitmapFormatByteOrderMask (1L << 0)
#define BitmapFormatBitOrderMask (1L << 1)
#define BitmapFormatImageRectMask (3L << 2)
#define BitmapFormatScanlinePadMask (3L << 8)
#define BitmapFormatScanlineUnitMask (3L << 12)
#define BitmapFormatByteOrderLSB (0)
#define BitmapFormatByteOrderMSB (1L << 0)
#define BitmapFormatBitOrderLSB (0)
#define BitmapFormatBitOrderMSB (1L << 1)
#define BitmapFormatImageRectMin (0L << 2)
#define BitmapFormatImageRectMaxWidth (1L << 2)
#define BitmapFormatImageRectMax (2L << 2)
#define BitmapFormatScanlinePad8 (0L << 8)
#define BitmapFormatScanlinePad16 (1L << 8)
#define BitmapFormatScanlinePad32 (2L << 8)
#define BitmapFormatScanlinePad64 (3L << 8)
#define BitmapFormatScanlineUnit8 (0L << 12)
#define BitmapFormatScanlineUnit16 (1L << 12)
#define BitmapFormatScanlineUnit32 (2L << 12)
#define BitmapFormatScanlineUnit64 (3L << 12)
#define BitmapFormatMaskByte (1L << 0)
#define BitmapFormatMaskBit (1L << 1)
#define BitmapFormatMaskImageRectangle (1L << 2)
#define BitmapFormatMaskScanLinePad (1L << 3)
#define BitmapFormatMaskScanLineUnit (1L << 4)
typedef CARD32 fsBitmapFormat;
typedef CARD32 fsBitmapFormatMask;
#endif /* _FSMASKS_H_ */
......@@ -106,22 +106,6 @@ RENDERLIBDIR = Xrender
EXPATBUILDDIR = expat
#endif
#if BuildFreetype2Library
FREETYPE2BUILDDIR = freetype2
#endif
#if BuildFontconfigLibrary
FONTCONFIGBUILDDIR = fontconfig
#endif
#if BuildXftLibrary
XFTLIBDIR = Xft
#endif
#if BuildXft1Library
XFT1LIBDIR = Xft1
#endif
#if BuildRandRLibrary
RANDRLIBDIR = Xrandr
#endif
......@@ -165,7 +149,7 @@ XF86EXTLIBS = $(XF86MISCLIBDIR) $(XF86VMLIBDIR) \
LBXUTILDIR = lbxutil
#endif
#if (BuildLBX || GzipFontCompression) && !HasZlib
#if BuildLBX && !HasZlib
ZLIBDIR = zlib
#endif
......@@ -177,16 +161,6 @@ REGEXDIR = regex
XALIBDIR = Xa
#endif
#if BuildFontCacheLib
FONTCACHELIBDIR = Xfontcache
#endif
FONTSUBDIR = font
#if BuildFontEncLib
FONTENCSUBDIR = fontenc
#endif
#if BuildXauLib
XAULIBDIR = Xau
#endif
......@@ -218,15 +192,13 @@ LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \
$(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(EXPATBUILDDIR) \
$(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \
$(DPSLIBDIR) $(PSRESLIBDIR) $(DPSTKLIBDIR) $(XINERAMADIR) \
$(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \
$(FONTCONFIGBUILDDIR) $(XFT1LIBDIR) \
$(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \
$(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) \
$(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \
$(XRESLIBDIR) $(APPLELIBDIR) $(DMXLIBDIR) $(WINDOWSLIBDIR) \
$(XEVIELIBDIR) $(XFIXESLIBDIR) $(DAMAGELIBDIR) \
$(XCURSORLIBDIR) $(COMPOSITELIBDIR)
SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \
$(FONTCACHELIBDIR)
SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS)
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
......
......@@ -26,13 +26,6 @@ XCOMM NONSTANDARD_HEADERS below.
#define SharedXrenderRev 1.1
SOXRENDERREV = SharedXrenderRev
#if SharedLibXrender
#define SharedXft1Rev 1.2
SharedLibReferences(XFT1,Xft,$(XFT1SRC),SOXFT1REV,SharedXft1Rev)
#else
ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1SRC),BuildLibDir)
#endif
#undef LinkBuildLibrary
#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\
RemoveFile($(BUILDLIBDIR)/lib) @@\
......
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $
XCOMM $XFree86: xc/lib/font/Imakefile,v 3.37 2003/10/24 16:21:12 tsi Exp $
#include <Server.tmpl>
#define IHaveSubdirs
#define DoNormalLib NormalLibFont
#define DoSharedLib SharedLibFont
#define DoExtraLib SharedLibFont
#define DoDebugLib DebugLibFont
#define DoProfileLib ProfileLibFont
#if !BuildFontLib
#define LibCreate NO
#else
#define LibCreate YES
#endif
#if BuildLibraries
#define LibInstall YES
#else
#define LibInstall NO
#endif
#if BuildLibraries
STUBDIRS = stubs
#endif
LIBNAME = NX_Xfont
SOREV = $(SOFONTREV)
#ifndef SeparateSharedCompile
#define SeparateSharedCompile YES
#endif
#if NormalLibFont && SharedLibFont && SeparateSharedCompile
STATIC_OBJSDIR = unshared/
#endif
#ifdef SharedXfontReqs
REQUIREDLIBS = SharedXfontReqs
#endif
#if BuildSpeedo
SPEEDODIRS = Speedo
SPEEDOSHAREDOBJS = Speedo/?*.o
SPEEDOSTATICOBJS = Speedo/$(STATIC_OBJSDIR)?*.o
SPEEDODEBUGOBJS = Speedo/debugger/?*.o
SPEEDOPROFILEOBJS = Speedo/profiled/?*.o
SPEEDODONES = Speedo/DONE
#endif
#if BuildType1 || BuildCID
TYPE1DIRS = Type1
TYPE1SHAREDOBJS = Type1/?*.o
TYPE1STATICOBJS = Type1/$(STATIC_OBJSDIR)?*.o
TYPE1DEBUGOBJS = Type1/debugger/?*.o
TYPE1PROFILEOBJS = Type1/profiled/?*.o
TYPE1DONES = Type1/DONE
#endif
#if BuildFreeType || BuildFreetype2Library
FREETYPEDIRS = FreeType
FREETYPESHAREDOBJS = FreeType/?*.o
FREETYPESTATICOBJS = FreeType/$(STATIC_OBJSDIR)?*.o
FREETYPEDEBUGOBJS = FreeType/debugger/?*.o
FREETYPEPROFILEOBJS = FreeType/profiled/?*.o
FREETYPEDONES = FreeType/DONE
#endif
#if BuildBuiltinFonts
BUILTINDIRS = builtins
BUILTINSHAREDOBJS = builtins/?*.o
BUILTINSTATICOBJS = builtins/$(STATIC_OBJSDIR)?*.o
BUILTINDEBUGOBJS = builtins/debugger/?*.o
BUILTINPROFILEOBJS = builtins/profiled/?*.o
BUILTINDONES = builtins/DONE
#endif
#if BuildFontCache
FONTCACHEDIRS = fontcache
FONTCACHESHAREDOBJS = fontcache/?*.o
FONTCACHESTATICOBJS = fontcache/$(STATIC_OBJSDIR)?*.o
FONTCACHEDEBUGOBJS = fontcache/debugger/?*.o
FONTCACHEPROFILEOBJS = fontcache/profiled/?*.o
FONTCACHEDONES = fontcache/DONE
#endif
SUBDIRS = bitmap fontfile fc $(FONTCACHEDIRS) \
$(SPEEDODIRS) $(TYPE1DIRS) \
$(FREETYPEDIRS) $(BUILTINDIRS) \
util $(STUBDIRS) include
SHARED_OBJS = bitmap/?*.o fontfile/?*.o fc/?*.o $(FONTCACHESHAREDOBJS) \
$(SPEEDOSHAREDOBJS) $(TYPE1SHAREDOBJS) \
$(FREETYPESHAREDOBJS) \
$(BUILTINSHAREDOBJS) util/?*.o
STATIC_OBJS = bitmap/$(STATIC_OBJSDIR)?*.o fontfile/$(STATIC_OBJSDIR)?*.o \
fc/$(STATIC_OBJSDIR)?*.o $(FONTCACHESTATICOBJS) \
$(SPEEDOSTATICOBJS) $(TYPE1STATICOBJS) \
$(FREETYPESTATICOBJS) \
$(BUILTINSTATICOBJS) util/$(STATIC_OBJSDIR)?*.o
DEBUG_OBJS = bitmap/debugger/?*.o fontfile/debugger/?*.o fc/debugger/?*.o \
$(FONTCACHEDEBUGOBJS) \
$(SPEEDODEBUGOBJS) $(TYPE1DEBUGOBJS) \
$(FREETYPEDEBUGOBJS) \
$(BUILTINDEBUGOBJS) util/debugger/?*.o
PROFILE_OBJS = bitmap/profiled/?*.o fontfile/profiled/?*.o fc/profiled/?*.o \
$(FONTCACHEPROFILEOBJS) \
$(SPEEDOPROFILEOBJS) $(TYPE1PROFILEOBJS) \
$(FREETYPEPROFILEOBJS) \
$(BUILTINPROFILEOBJS) util/profiled/?*.o
DONES = bitmap/DONE fontfile/DONE fc/DONE $(FONTCACHEDONES) \
$(SPEEDODONES) $(TYPE1DONES) \
$(FREETYPEDONES) \
$(BUILTINDONES) util/DONE
#if BuildServer && DoLoadableServer
BASEDIRS = fontfile fc util $(FONTCACHEDIRS)
BASELIBOBJS = fontfile/$(STATIC_OBJSDIR)?*.o fc/$(STATIC_OBJSDIR)?*.o \
util/$(STATIC_OBJSDIR)?*.o $(FONTCACHESTATICOBJS)
BASEOBJS = fontfile/module/ffcheck.o fontfile/module/register.o \
util/private.o
BASEDONES = fontfile/DONE fontfile/module/DONE fc/DONE util/DONE \
$(FONTCACHEDONES)
#endif
#if HasParallelMake
MakeMutex($(SUBDIRS) $(DONES))
#endif
#if HasGnuMake || HasBsdMake
$(DONES): $(SUBDIRS)
#endif
#include <Library.tmpl>
#undef _LinkBuildLibrary
#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
#if LibCreate
#if NormalLibFont
NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS))
#if LibInstall
InstallLibrary($(LIBNAME),$(USRLIBDIR))
#endif /* LibInstall */
#endif /* NormalLibFont */
#if SharedLibFont
SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.)
#if LibInstall
InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
#endif /* LibInstall */
#endif /* SharedLibFont */
#if DebugLibFont
DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS))
#if LibInstall
InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
#endif /* LibInstall */
#endif /* DebugLibFont */
#if ProfileLibFont
ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS))
#if LibInstall
InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
#endif /* LibInstall */
#endif /* ProfileLibFont */
#endif /* LibCreate */
#if BuildServer && DoLoadableServer
NormalDepLibraryTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASELIBOBJS))
NormalDepRelocatableTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASEOBJS))
#endif
ForceSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:24 cpqbld Exp $
XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.10 2001/01/19 08:13:29 dawes Exp $
#if BuildServer && DoLoadableServer
#define IHaveSubdirs
#define NoLibSubdirs
#define PassCDebugFlags
SUBDIRS = module
#endif
INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include
HEADERS =
SPEEDOSRCS = do_char.c do_trns.c out_bl2d.c out_blk.c \
out_scrn.c out_util.c reset.c set_spcs.c set_trns.c
SPEEDOOBJS = do_char.o do_trns.o out_bl2d.o out_blk.o \
out_scrn.o out_util.o reset.o set_spcs.o set_trns.o
SRCS = spfuncs.c spfile.c spinfo.c sperr.c spfont.c spglyph.c \
spencode.c bics-unicode.c \
$(SPEEDOSRCS)
OBJS = spfuncs.o spfile.o spinfo.o sperr.o spfont.o spglyph.o \
spencode.o bics-unicode.o \
$(SPEEDOOBJS)
#if BuildFontLib
#define DoNormalLib NormalLibFont
#define DoSharedLib SharedLibFont
#define DoDebugLib DebugLibFont
#define DoProfileLib ProfileLibFont
#include <Library.tmpl>
LibraryObjectRule()
SubdirLibraryRule($(OBJS))
NormalLintTarget($(SRCS))
#endif
#if BuildServer && DoLoadableServer
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#endif
DependTarget()
/* $Xorg: adobe-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */
/*
* Latin 1 format from masterset format 11 (ps)
* 0 implies no valid mapping
*/
int adobe_map[] = {
32, 32,
33, 33,
34, 34,
35, 35,
36, 36,
37, 37,
38, 38,
39, 169,
40, 40,
41, 41,
42, 42,
43, 43,
44, 44,
45, 45,
46, 46,
47, 47,
48, 48,
49, 49,
50, 50,
51, 51,
52, 52,
53, 53,
54, 54,
55, 55,
56, 56,
57, 57,
58, 58,
59, 59,
60, 60,
61, 61,
62, 62,
63, 63,
64, 64,
65, 65,
66, 66,
67, 67,
68, 68,
69, 69,
70, 70,
71, 71,
72, 72,
73, 73,
74, 74,
75, 75,
76, 76,
77, 77,
78, 78,
79, 79,
80, 80,
81, 81,
82, 82,
83, 83,
84, 84,
85, 85,
86, 86,
87, 87,
88, 88,
89, 89,
90, 90,
91, 91,
92, 92,
93, 93,
94, 195,
95, 95,
96, 193,
97, 97,
98, 98,
99, 99,
100, 100,
101, 101,
102, 102,
103, 103,
104, 104,
105, 105,
106, 106,
107, 107,
108, 108,
109, 109,
110, 110,
111, 111,
112, 112,
113, 113,
114, 114,
115, 115,
116, 116,
117, 117,
118, 118,
119, 119,
120, 120,
121, 121,
122, 122,
123, 123,
124, 124,
125, 125,
126, 196, /* lc tilde */
127, 0, /* */
161, 161, /* invert exclamation */
162, 162, /* cent */
163, 163, /* pound sterling */
164, 168, /* intl currency */
165, 165, /* yen */
166, 320, /* split vert bar */
167, 167, /* section mark */
168, 200, /* dierisis */
169, 0, /* superior copyright */
170, 0, /* feminine ordinal */
171, 171, /* dbl left guillemot */
172, 314, /* math not */
173, 0, /* hyphen ? */
174, 0, /* superior registered */
175, 0, /* overscore */
176, 321, /* degree */
177, 329, /* math +- */
178, 333, /* superior 2 */
179, 332, /* superior 3 */
180, 194, /* lc acute */
181, 324, /* greek lc mu */
182, 182, /* Paragraph */
183, 180, /* center dot */
184, 203, /* cedilla lc */
185, 328, /* superior 1 */
186, 0, /* masculine ordinal(using superior o) */
187, 187, /* right dbl guillemot */
188, 327, /* 1/4 */
189, 326, /* 1/2 */
190, 331, /* 3/4 */
191, 191, /* invert question */
192, 259, /* A grave */
193, 256, /* A acute */
194, 257, /* A circumflex */
195, 261, /* A tilde */
196, 258, /* A dierisis */
197, 260, /* A angstrom */
198, 225, /* AE ligature */
199, 262, /* C cedilla */
200, 266, /* E grave */
201, 263, /* E acute */
202, 264, /* E circumflex */
203, 265, /* E dierisis */
204, 270, /* I grave */
205, 267, /* I acute */
206, 268, /* I circumflex */
207, 269, /* I dierisis */
208, 317, /* D bar */
209, 271, /* N tilde */
210, 275, /* O grave */
211, 272, /* O acute */
212, 273, /* O circumflex */
213, 276, /* O tilde */
214, 274, /* O dierisis */
215, 325, /* math multiply */
216, 233, /* O bar */
217, 281, /* U grave */
218, 278, /* U acute */
219, 279, /* U circumflex */
220, 280, /* U dierisis */
221, 319, /* Y acute */
222, 318, /* icelandic thorn lc */
223, 251, /* German dbl s */
224, 287, /* a grave */
225, 284, /* a acute */
226, 285, /* a circumflex */
227, 289, /* a tilde */
228, 286, /* a dierisis */
229, 288, /* a angstrom */
230, 241, /* ae ligature */
231, 290, /* c cedilla */
232, 294, /* e grave */
233, 291, /* e acute */
234, 292, /* e circumflex */
235, 293, /* e dierisis */
236, 298, /* i grave */
237, 295, /* i acute */
238, 296, /* i circumflex */
239, 297, /* i dierisis */
240, 323, /* icelandic eth lc */
241, 299, /* n tilde */
242, 303, /* o grave */
243, 300, /* o acute */
244, 301, /* o circumflex */
245, 304, /* o tilde */
246, 302, /* o dierisis */
247, 322, /* math divide */
248, 249, /* o bar */
249, 309, /* u grave */
250, 306, /* u acute */
251, 307, /* u circumflex */
252, 308, /* u dierisis */
253, 334, /* y acute */
254, 330, /* icelandic thorn uc */
255, 310, /* y dierisis */
};
/* $Xorg: bics-iso.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.6 2001/01/17 19:43:17 dawes Exp $ */
int sp_bics_map[] = {
32, 0,
33, 1,
34, 2,
35, 3,
36, 4,
37, 5,
38, 6,
39, 264,
40, 8,
41, 9,
42, 10,
43, 11,
44, 12,
45, 13,
46, 14,
47, 15,
48, 16,
49, 17,
50, 18,
51, 19,
52, 20,
53, 21,
54, 22,
55, 23,
56, 24,
57, 25,
58, 26,
59, 27,
60, 28,
61, 29,
62, 30,
63, 31,
64, 32,
65, 33,
66, 34,
67, 35,
68, 36,
69, 37,
70, 38,
71, 39,
72, 40,
73, 41,
74, 42,
75, 43,
76, 44,
77, 45,
78, 46,
79, 47,
80, 48,
81, 49,
82, 50,
83, 51,
84, 52,
85, 53,
86, 54,
87, 55,
88, 56,
89, 57,
90, 58,
91, 59,
92, 60,
93, 61,
94, 133,
95, 63,
96, 131,
97, 65,
98, 66,
99, 67,
100, 68,
101, 69,
102, 70,
103, 71,
104, 72,
105, 73,
106, 74,
107, 75,
108, 76,
109, 77,
110, 78,
111, 79,
112, 80,
113, 81,
114, 82,
115, 83,
116, 84,
117, 85,
118, 86,
119, 87,
120, 88,
121, 89,
122, 90,
123, 91,
124, 92,
125, 93,
126, 137,
127, 358,
161, 128,
162, 98,
163, 97,
164, 278,
165, 274,
166, 277,
167, 110,
168, 135,
169, 503,
170, 538,
171, 125,
172, 309,
173, 191,
174, 504,
175, 230,
176, 339,
177, 286,
178, 160,
179, 161,
180, 129,
181, 325,
182, 279,
183, 102,
184, 141,
185, 159,
186, 544,
187, 126,
188, 151,
189, 153,
190, 155,
191, 127,
192, 259,
193, 261,
194, 257,
195, 253,
196, 255,
197, 113,
198, 114,
199, 148,
200, 249,
201, 251,
202, 247,
203, 245,
204, 239,
205, 241,
206, 237,
207, 235,
208, 169,
209, 196,
210, 202,
211, 200,
212, 204,
213, 208,
214, 206,
215, 284,
216, 115,
217, 212,
218, 210,
219, 214,
220, 216,
221, 224,
222, 271,
223, 121,
224, 260,
225, 262,
226, 258,
227, 254,
228, 256,
229, 117,
230, 118,
231, 149,
232, 250,
233, 252,
234, 248,
235, 246,
236, 240,
237, 242,
238, 238,
239, 236,
240, 273,
241, 195,
242, 201,
243, 199,
244, 203,
245, 207,
246, 205,
247, 285,
248, 119,
249, 211,
250, 209,
251, 213,
252, 215,
253, 223,
254, 272,
255, 221,
};
/*
Copyright (c) 1998 by Juliusz Chroboczek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* $XFree86$ */
/* These data are very dodgy. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "bics-unicode.h"
static short table_160[]=
{0, 128, 98, 97, 278, 274, 277, 110, 135, 503, 538, 125, 309, 191, 504,
230, 339, 286, 160, 161, 129, 325, 279, 102, 141, 159, 544, 126, 151,
153, 155, 127, 259, 261, 257, 253, 255, 113, 114, 148, 249, 251, 247,
245, 239, 241, 237, 235, 169, 196, 202, 200, 204, 208, 206, 284, 115,
212, 210, 214, 216, 224, 271, 121, 260, 262, 258, 254, 256, 117, 118,
149, 250, 252, 248, 246, 240, 242, 238, 236, 273, 195, 201, 199, 203,
207, 205, 285, 119, 211, 209, 213, 215, 223, 272, 221, 477, 476, 374,
373, 171, 177, 376, 375, -1, -1, -1, -1, 378, 377, 379, -1, 169, 173,
383, 382, -1, -1, -1, -1, 172, 178, 243, 244, -1, -1, -1, -1, -1, -1,
385, -1, -1, -1, -1, -1, 233, 234, 387, 386, -1, -1, 391, 390, 389,
122, 276, 275, -1, -1, 393, 392, -1, 395, 394, 399, 398, -1, -1, -1,
-1, 170, 174, 194, 193, 402, 401, 198, 197, 263, -1, -1, -1, -1, -1,
-1, 404, 403, 116, 120, -1, -1, 408, 407, 406, 405, 410, 409, -1, -1,
486, 485, 412, 411, 419, 418, 364, 363, -1, -1, 218, 217, 421, 420, -1,
-1, 220, 219, 423, 422, -1, 268, 425, 424, -1, -1, 222, 368, 367, 372,
371, 370, 369};
static short table_728[]={144, 181, 146, 731, 137, 183};
static short table_915[]=
{313, 314, -1, -1, -1, 315, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
316, -1, -1, 317, -1, -1, 318, -1, -1, -1, -1, -1, -1, -1, 319, 320,
-1, 321, 322, -1, 323, 324, -1, -1, -1, 325, -1, -1, -1, 326, -1, -1,
327, 328, -1, 329};
static short table_8211[]=
{111, 112, -1, -1, -1, -1, -1, 106, -1, 103, 105, 107, 104, 108, 109,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 100, -1, -1,
-1, -1, -1, -1, -1, -1, 123, 124, -1, 265};
static short table_8319[]=
{543, 475, 466, 467, 468, 469, 470, 471, 472, 473, 474, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 491, -1, -1, -1, 266};
static short table_8592[]={293, 295, 294, 292, 297, 296};
static short table_8712[]=
{298, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 492, -1, -1, -1, -1, -1,
-1, 302, -1, -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 299,
-1, -1, -1, -1, 428};
static short table_8800[]={288, -1, -1, -1, 291, 290};
static short table_9600[]=
{304, -1, -1, -1, 305, -1, -1, -1, 308, -1, -1, -1, 306, -1, -1, -1,
307, 357, 358, 359, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 348, -1, -1, -1, 345, -1, -1, -1, -1, -1, 347, -1, -1, -1, 346,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, -1, -1, -1, 342, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 344};
static short table_9784[]={360, -1, 361, 362, -1, -1, -1, -1, 350, -1, 349};
static short table_9824[]=
{354, -1, -1, 352, -1, 351, 353, -1, -1, -1, 330, 331};
static short table_64256[]={282, 95, 96, 281};
int
unicode_to_bics(unsigned code)
{
if(code<32) return -1;
else if(code<127) return code-32;
else if(code<160) return -1;
else if(code<383) return table_160[code-160];
else if(code==402) return 99;
else if(code==486) return 480;
else if(code==487) return 379;
else if(code==501) return 384;
else if(code==711) return 139;
else if(code<728) return -1;
else if(code<734) return table_728[code-728];
else if(code<915) return -1;
else if(code<967) return table_915[code-915];
else if(code<8211) return -1;
else if(code<8253) return table_8211[code-8211];
else if(code<8319) return -1;
else if(code<8360) return table_8319[code-8319];
else if(code<8592) return -1;
else if(code<8598) return table_8592[code-8592];
else if(code==8616) return 340;
else if(code<8712) return -1;
else if(code<8751) return table_8712[code-8712];
else if(code<8800) return -1;
else if(code<8806) return table_8800[code-8800];
else if(code==8976) return 310;
else if(code==8992) return 300;
else if(code==8993) return 301;
else if(code==9400) return 332;
else if(code==9415) return 333;
else if(code==9473) return 355;
else if(code==9475) return 356;
else if(code<9600) return -1;
else if(code<9690) return table_9600[code-9600];
else if(code==9711) return 343;
else if(code<9784) return -1;
else if(code<9795) return table_9784[code-9784];
else if(code<9824) return -1;
else if(code<9836) return table_9824[code-9824];
else if(code<64256) return -1;
else if(code<64261) return table_64256[code-64256];
else return -1;
}
/* $XFree86$ */
int unicode_to_bics(unsigned);
/* $Xorg: keys.h,v 1.3 2000/08/17 19:46:25 cpqbld Exp $ */
/*
Copyright 1989-1991, Bitstream Inc., Cambridge, MA.
You are hereby granted permission under all Bitstream propriety rights to
use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo
software and the Bitstream Charter outline font for any purpose and without
restrictions; provided, that this notice is left intact on all copies of such
software or font and that Bitstream's trademark is acknowledged as shown below
on all unmodified copies of such font.
BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT
DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER
INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED
WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
*/
/***** DECRYPTION KEY CONSTANTS (PC Platform) *****/
#define CUS0 432 /* Customer number */
#define KEY0 0 /* Decryption key 0 */
#define KEY1 72 /* Decryption key 1 */
#define KEY2 123 /* Decryption key 2 */
#define KEY3 1 /* Decryption key 3 */
#define KEY4 222 /* Decryption key 4 */
#define KEY5 194 /* Decryption key 5 */
#define KEY6 113 /* Decryption key 6 */
#define KEY7 119 /* Decryption key 7 */
#define KEY8 52 /* Decryption key 8 */
/***** DECRYPTION KEY CONSTANTS (Sample) *****/
#define XSAMPLEFONTS
#define XCUS0 0 /* Customer number */
#define XKEY0 0 /* Decryption key 0 */
#define XKEY1 0 /* Decryption key 1 */
#define XKEY2 0 /* Decryption key 2 */
#define XKEY3 0 /* Decryption key 3 */
#define XKEY4 0 /* Decryption key 4 */
#define XKEY5 0 /* Decryption key 5 */
#define XKEY6 0 /* Decryption key 6 */
#define XKEY7 0 /* Decryption key 7 */
#define XKEY8 0 /* Decryption key 8 */
XCOMM $XFree86: xc/lib/font/Speedo/module/Imakefile,v 1.5 1999/08/14 10:49:18 dawes Exp $
#define IHaveModules
#include <Server.tmpl>
INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \
-I$(XINCLUDESRC) -I../
HEADERS =
DEFINES = -DFONTMODULE
SPEEDOSRCS = do_char.c do_trns.c out_bl2d.c out_blk.c speedomod.c \
out_scrn.c out_util.c reset.c set_spcs.c set_trns.c
SPEEDOOBJS = do_char.o do_trns.o out_bl2d.o out_blk.o speedomod.o \
out_scrn.o out_util.o reset.o set_spcs.o set_trns.o
SRCS = spfuncs.c spfile.c spinfo.c sperr.c spfont.c spglyph.c \
spencode.c bics-unicode.c \
$(SPEEDOSRCS)
OBJS = spfuncs.o spfile.o spinfo.o sperr.o spfont.o spglyph.o \
spencode.o bics-unicode.o \
$(SPEEDOOBJS)
LinkSourceFile(bics-unicode.c,..)
LinkSourceFile(do_char.c,..)
LinkSourceFile(do_trns.c,..)
LinkSourceFile(out_bl2d.c,..)
LinkSourceFile(out_blk.c,..)
LinkSourceFile(out_scrn.c,..)
LinkSourceFile(out_util.c,..)
LinkSourceFile(reset.c,..)
LinkSourceFile(set_spcs.c,..)
LinkSourceFile(set_trns.c,..)
LinkSourceFile(spfuncs.c,..)
LinkSourceFile(spfile.c,..)
LinkSourceFile(spinfo.c,..)
LinkSourceFile(sperr.c,..)
LinkSourceFile(spfont.c,..)
LinkSourceFile(spglyph.c,..)
LinkSourceFile(spencode.c,..)
ModuleObjectRule()
LibraryModuleTarget(speedo,$(OBJS))
InstallLibraryModule(speedo,$(MODULEDIR),fonts)
DependTarget()
InstallDriverSDKLibraryModule(speedo,$(DRIVERSDKMODULEDIR),fonts)
/*
* Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the XFree86 Project shall
* not be used in advertising or otherwise to promote the sale, use or other
* dealings in this Software without prior written authorization from the
* XFree86 Project.
*/
/* $XFree86: xc/lib/font/Speedo/module/speedomod.c,v 1.8 2001/09/04 13:49:16 dawes Exp $ */
#include "misc.h"
#include <X11/fonts/fontmod.h>
#include "xf86Module.h"
static MODULESETUPPROTO(speedoSetup);
/*
* This is the module data function that is accessed when loading
* libspeedo as a module.
*/
static XF86ModuleVersionInfo VersRec =
{
"speedo",
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
1, 0, 1,
ABI_CLASS_FONT, /* A font module */
ABI_FONT_VERSION,
MOD_CLASS_FONT,
{0,0,0,0} /* signature, to be patched into the file by a tool */
};
XF86ModuleData speedoModuleData = { &VersRec, speedoSetup, NULL };
extern void SpeedoRegisterFontFileFunctions(void);
FontModule speedoModule = {
SpeedoRegisterFontFileFunctions,
"Speedo",
NULL
};
static pointer
speedoSetup(pointer module, pointer opts, int *errmaj, int *errmin)
{
speedoModule.module = module;
LoadFont(&speedoModule);
/* Need a non-NULL return */
return (pointer)1;
}
/* $Xorg: out_outl.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */
/*
Copyright 1989-1991, Bitstream Inc., Cambridge, MA.
You are hereby granted permission under all Bitstream propriety rights to
use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo
software and the Bitstream Charter outline font for any purpose and without
restrictions; provided, that this notice is left intact on all copies of such
software or font and that Bitstream's trademark is acknowledged as shown below
on all unmodified copies of such font.
BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT
DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER
INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED
WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
*/
/**************************** O U T _ 2 _ 1 . C ******************************
* *
* This is the standard output module for vector output mode. *
* *
****************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "spdo_prv.h" /* General definitions for Speedo */
#define DEBUG 0
#if DEBUG
#include <stdio.h>
#define SHOW(X) printf("X = %d\n", X)
#else
#define SHOW(X)
#endif
/* the following macro is used to limit points on the outline to the bounding box */
#define RANGECHECK(value,min,max) (((value) >= (min) ? (value) : (min)) < (max) ? (value) : (max))
/***** GLOBAL VARIABLES *****/
/***** GLOBAL FUNCTIONS *****/
/***** EXTERNAL VARIABLES *****/
/***** EXTERNAL FUNCTIONS *****/
/***** STATIC VARIABLES *****/
/***** STATIC FUNCTIONS *****/
#if INCL_OUTLINE
FUNCTION boolean init_outline(specsarg)
GDECL
specs_t GLOBALFAR *specsarg;
/*
* init_out2() is called by sp_set_specs() to initialize the output module.
* Returns TRUE if output module can accept requested specifications.
* Returns FALSE otherwise.
*/
{
#if DEBUG
printf("INIT_OUT_2()\n");
#endif
if (specsarg->flags & (CLIP_LEFT + CLIP_RIGHT + CLIP_TOP + CLIP_BOTTOM))
return FALSE; /* Clipping not supported */
return (TRUE);
}
#endif
#if INCL_OUTLINE
FUNCTION boolean begin_char_outline(Psw, Pmin, Pmax)
GDECL
point_t Psw; /* End of escapement vector (sub-pixels) */
point_t Pmin; /* Bottom left corner of bounding box */
point_t Pmax; /* Top right corner of bounding box */
/*
* If two or more output modules are included in the configuration, begin_char2()
* is called by begin_char() to signal the start of character output data.
* If only one output module is included in the configuration, begin_char() is
* called by make_simp_char() and make_comp_char().
*/
{
fix31 set_width_x;
fix31 set_width_y;
fix31 xmin;
fix31 xmax;
fix31 ymin;
fix31 ymax;
#if DEBUG
printf("BEGIN_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n",
(real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix,
(real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix,
(real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix);
#endif
sp_globals.poshift = 16 - sp_globals.pixshift;
set_width_x = (fix31)Psw.x << sp_globals.poshift;
set_width_y = (fix31)Psw.y << sp_globals.poshift;
xmin = (fix31)Pmin.x << sp_globals.poshift;
xmax = (fix31)Pmax.x << sp_globals.poshift;
ymin = (fix31)Pmin.y << sp_globals.poshift;
ymax = (fix31)Pmax.y << sp_globals.poshift;
sp_globals.xmin = Pmin.x;
sp_globals.xmax = Pmax.x;
sp_globals.ymin = Pmin.y;
sp_globals.ymax = Pmax.y;
open_outline(set_width_x, set_width_y, xmin, xmax, ymin, ymax);
return TRUE;
}
#endif
#if INCL_OUTLINE
FUNCTION void begin_sub_char_outline(Psw, Pmin, Pmax)
GDECL
point_t Psw; /* End of sub-char escapement vector */
point_t Pmin; /* Bottom left corner of sub-char bounding box */
point_t Pmax; /* Top right corner of sub-char bounding box */
/*
* If two or more output modules are included in the configuration, begin_sub_char2()
* is called by begin_sub_char() to signal the start of sub-character output data.
* If only one output module is included in the configuration, begin_sub_char() is
* called by make_comp_char().
*/
{
#if DEBUG
printf("BEGIN_SUB_CHAR_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f\n",
(real)Psw.x / (real)onepix, (real)Psw.y / (real)onepix,
(real)Pmin.x / (real)onepix, (real)Pmin.y / (real)onepix,
(real)Pmax.x / (real)onepix, (real)Pmax.y / (real)onepix);
#endif
start_new_char();
}
#endif
#if INCL_OUTLINE
FUNCTION void begin_contour_outline(P1, outside)
GDECL
point_t P1; /* Start point of contour */
boolean outside; /* TRUE if outside (counter-clockwise) contour */
/*
* If two or more output modules are included in the configuration, begin_contour2()
* is called by begin_contour() to define the start point of a new contour
* and to indicate whether it is an outside (counter-clockwise) contour
* or an inside (clockwise) contour.
* If only one output module is included in the configuration, begin_sub_char() is
* called by proc_outl_data().
*/
{
fix15 x,y;
#if DEBUG
printf("BEGIN_CONTOUR_2(%3.1f, %3.1f, %s)\n",
(real)P1.x / (real)onepix, (real)P1.y / (real)onepix, outside? "outside": "inside");
#endif
x = RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax);
y = RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax);
start_contour((fix31)x << sp_globals.poshift, (fix31)y << sp_globals.poshift, outside);
}
#endif
#if INCL_OUTLINE
FUNCTION void curve_outline(P1, P2, P3,depth)
GDECL
point_t P1; /* First control point of Bezier curve */
point_t P2; /* Second control point of Bezier curve */
point_t P3; /* End point of Bezier curve */
fix15 depth;
/*
* If two or more output modules are included in the configuration, curve2()
* is called by curve() to output one curve segment.
* If only one output module is included in the configuration, curve() is
* called by proc_outl_data().
* This function is only called when curve output is enabled.
*/
{
fix15 x1,y1,x2,y2,x3,y3;
#if DEBUG
printf("CURVE_2(%3.1f, %3.1f, %3.1f, %3.1f, %3.1f, %3.1f)\n",
(real)P1.x / (real)onepix, (real)P1.y / (real)onepix,
(real)P2.x / (real)onepix, (real)P2.y / (real)onepix,
(real)P3.x / (real)onepix, (real)P3.y / (real)onepix);
#endif
x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax);
y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax);
x2= RANGECHECK(P2.x,sp_globals.xmin,sp_globals.xmax);
y2= RANGECHECK(P2.y,sp_globals.ymin,sp_globals.ymax);
x3= RANGECHECK(P3.x,sp_globals.xmin,sp_globals.xmax);
y3= RANGECHECK(P3.y,sp_globals.ymin,sp_globals.ymax);
curve_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift,
(fix31)x2<< sp_globals.poshift, (fix31)y2 << sp_globals.poshift,
(fix31)x3 << sp_globals.poshift, (fix31)y3 << sp_globals.poshift);
}
#endif
#if INCL_OUTLINE
FUNCTION void line_outline(P1)
GDECL
point_t P1; /* End point of vector */
/*
* If two or more output modules are included in the configuration, line2()
* is called by line() to output one vector.
* If only one output module is included in the configuration, line() is
* called by proc_outl_data(). If curve output is enabled, line() is also
* called by split_curve().
*/
{
fix15 x1,y1;
#if DEBUG
printf("LINE_2(%3.1f, %3.1f)\n", (real)P1.x / (real)onepix, (real)P1.y / (real)onepix);
#endif
x1= RANGECHECK(P1.x,sp_globals.xmin,sp_globals.xmax);
y1= RANGECHECK(P1.y,sp_globals.ymin,sp_globals.ymax);
line_to((fix31)x1 << sp_globals.poshift, (fix31)y1 << sp_globals.poshift);
}
#endif
#if INCL_OUTLINE
FUNCTION void end_contour_outline()
GDECL
/*
* If two or more output modules are included in the configuration, end_contour2()
* is called by end_contour() to signal the end of a contour.
* If only one output module is included in the configuration, end_contour() is
* called by proc_outl_data().
*/
{
#if DEBUG
printf("END_CONTOUR_2()\n");
#endif
close_contour();
}
#endif
#if INCL_OUTLINE
FUNCTION void end_sub_char_outline()
GDECL
/*
* If two or more output modules are included in the configuration, end_sub_char2()
* is called by end_sub_char() to signal the end of sub-character data.
* If only one output module is included in the configuration, end_sub_char() is
* called by make_comp_char().
*/
{
#if DEBUG
printf("END_SUB_CHAR_2()\n");
#endif
}
#endif
#if INCL_OUTLINE
FUNCTION boolean end_char_outline()
GDECL
/*
* If two or more output modules are included in the configuration, end_char2()
* is called by end_char() to signal the end of the character data.
* If only one output module is included in the configuration, end_char() is
* called by make_simp_char() and make_comp_char().
* Returns TRUE if output process is complete
* Returns FALSE to repeat output of the transformed data beginning
* with the first contour (of the first sub-char if compound).
*/
{
#if DEBUG
printf("END_CHAR_2()\n");
#endif
close_outline();
return TRUE;
}
#endif
/* $Xorg: reset.c,v 1.3 2000/08/17 19:46:26 cpqbld Exp $ */
/*
Copyright 1989-1991, Bitstream Inc., Cambridge, MA.
You are hereby granted permission under all Bitstream propriety rights to
use, copy, modify, sublicense, sell, and redistribute the Bitstream Speedo
software and the Bitstream Charter outline font for any purpose and without
restrictions; provided, that this notice is left intact on all copies of such
software or font and that Bitstream's trademark is acknowledged as shown below
on all unmodified copies of such font.
BITSTREAM CHARTER is a registered trademark of Bitstream Inc.
BITSTREAM INC. DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECT
DAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHER
INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTED
WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.
*/
/* $XFree86: xc/lib/font/Speedo/reset.c,v 1.2 1999/02/07 06:18:17 dawes Exp $ */
/******************************* R E S E T . C *******************************
* *
* This module provides initialization functions. *
* *
****************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "spdo_prv.h" /* General definitions for Speedo */
#include "keys.h" /* Font decryption keys */
#define DEBUG 0
#if DEBUG
#include <stdio.h>
#define SHOW(X) printf("X = %d\n", X)
#else
#define SHOW(X)
#endif
/***** GLOBAL VARIABLES *****/
/***** GLOBAL FUNCTIONS *****/
/***** EXTERNAL VARIABLES *****/
/***** EXTERNAL FUNCTIONS *****/
/***** STATIC VARIABLES *****/
/***** STATIC FUNCTIONS *****/
FUNCTION void reset()
GDECL
/*
* Called by the host software to intialize the Speedo mechanism
*/
{
sp_globals.specs_valid = FALSE; /* Flag specs not valid */
/* Reset decryption key */
sp_globals.key32 = (KEY3 << 8) | KEY2;
sp_globals.key4 = KEY4;
sp_globals.key6 = KEY6;
sp_globals.key7 = KEY7;
sp_globals.key8 = KEY8;
#if INCL_RULES
sp_globals.constr.font_id_valid = FALSE;
#endif
#if INCL_MULTIDEV
#if INCL_BLACK || INCL_SCREEN || INCL_2D
sp_globals.bitmap_device_set = FALSE;
#endif
#if INCL_OUTLINE
sp_globals.outline_device_set = FALSE;
#endif
#endif
}
#if INCL_KEYS
FUNCTION void set_key(
GDECL
ufix8 key[]) /* Specified decryption key */
/*
* Dynamically sets font decryption key.
*/
{
sp_globals.key32 = ((ufix16)key[3] << 8) | key[2];
sp_globals.key4 = key[4];
sp_globals.key6 = key[6];
sp_globals.key7 = key[7];
sp_globals.key8 = key[8];
}
#endif
FUNCTION ufix16 get_cust_no(
GDECL
buff_t font_buff)
/*
returns customer number from font
*/
{
ufix8 FONTFAR *hdr2_org;
ufix16 private_off;
private_off = read_word_u(font_buff.org + FH_HEDSZ);
if (private_off + FH_CUSNR > font_buff.no_bytes)
{
report_error(1); /* Insufficient font data loaded */
return FALSE;
}
hdr2_org = font_buff.org + private_off;
return (read_word_u(hdr2_org + FH_CUSNR));
}
/* $Xorg: spencode.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Network Computing Devices or Digital
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.6 2001/01/17 19:43:18 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "spint.h"
/* No longer needed with new encoding code */
/* #include "bics-iso.h"
int sp_bics_map_size = (sizeof(sp_bics_map) / (sizeof(int) * 2));*/
#ifdef EXTRAFONTS
#include "adobe-iso.h"
int adobe_map_size = (sizeof(adobe_map) / (sizeof(int) * 2));
#endif /* EXTRAFONTS */
/* $Xorg: sperr.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of M.I.T., Network Computing Devices,
* or Digital not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. Network Computing Devices, or Digital
* make no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/*
Copyright 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.6 2001/12/14 19:56:41 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "spint.h"
#ifndef FONTMODULE
#include <stdarg.h>
#endif
extern void ErrorF(const char* f, ...);
void
SpeedoErr(char *str, ...)
{
va_list v;
int a1;
va_start(v, str);
ErrorF("Speedo: ");
a1 = va_arg(v, int);
ErrorF(str, a1);
va_end(v);
}
/*
* Called by Speedo character generator to report an error.
*
* Since character data not available is one of those errors
* that happens many times, don't report it to user
*/
void
sp_report_error(fix15 n)
{
switch (n) {
case 1:
SpeedoErr("Insufficient font data loaded\n");
break;
case 3:
SpeedoErr("Transformation matrix out of range\n");
break;
case 4:
SpeedoErr("Font format error\n");
break;
case 5:
SpeedoErr("Requested specs not compatible with output module\n");
break;
case 7:
SpeedoErr("Intelligent transformation requested but not supported\n");
break;
case 8:
SpeedoErr("Unsupported output mode requested\n");
break;
case 9:
SpeedoErr("Extended font loaded but only compact fonts supported\n");
break;
case 10:
SpeedoErr("Font specs not set prior to use of font\n");
break;
case 12:
break;
case 13:
SpeedoErr("Track kerning data not available()\n");
break;
case 14:
SpeedoErr("Pair kerning data not available()\n");
break;
default:
SpeedoErr("report_error(%d)\n", n);
break;
}
}
/* $Xorg: spfuncs.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Network Computing Devices or Digital
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Dave Lemke, Network Computing Devices, Inc
*/
/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.7 2001/08/27 19:49:51 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef FONTMODULE
#include <X11/Xos.h>
#endif
#include <X11/fonts/fntfilst.h>
#include <X11/fonts/fontutil.h>
#include "spint.h"
/* ARGSUSED */
static int
SpeedoOpenScalable (
FontPathElementPtr fpe,
FontPtr *pFont,
int flags,
FontEntryPtr entry,
char *fileName,
FontScalablePtr vals,
fsBitmapFormat format,
fsBitmapFormatMask fmask,
FontPtr non_cachable_font) /* We don't do licensing */
{
char fullName[MAXFONTNAMELEN];
strcpy (fullName, entry->name.name);
return SpeedoFontLoad (pFont, fullName, fileName, entry, vals,
format, fmask, flags);
}
/*
* XXX
*
* this does a lot more then i'd like, but it has to get the bitmaps
* in order to get accurate metrics (which it *must* have).
*
* a possible optimization is to avoid allocating the glyph memory
* and to simply save the values without doing the work.
*/
static int
get_font_info(
FontInfoPtr pinfo,
char *fontname,
char *filename,
FontEntryPtr entry,
FontScalablePtr vals,
SpeedoFontPtr *spfont)
{
SpeedoFontPtr spf;
int err;
long sWidth;
err = sp_open_font(fontname, filename, entry, vals,
(fsBitmapFormat) 0, (fsBitmapFormatMask) 0, (unsigned long) 0,
&spf);
if (err != Successful)
return err;
sp_fp_cur = spf;
sp_reset_master(spf->master);
sp_make_header(spf, pinfo);
sp_compute_bounds(spf, pinfo, (unsigned long) 0, &sWidth);
sp_compute_props(spf, fontname, pinfo, sWidth);
/* compute remaining accelerators */
FontComputeInfoAccelerators (pinfo);
*spfont = spf;
return Successful;
}
/* ARGSUSED */
static int
SpeedoGetInfoScaleable(
FontPathElementPtr fpe,
FontInfoPtr pFontInfo,
FontEntryPtr entry,
FontNamePtr fontName,
char *fileName,
FontScalablePtr vals)
{
SpeedoFontPtr spf = NULL;
char fullName[MAXFONTNAMELEN];
int err;
strcpy(fullName, entry->name.name);
FontParseXLFDName(fullName, vals, FONT_XLFD_REPLACE_VALUE);
err = get_font_info(pFontInfo, fullName, fileName, entry, vals, &spf);
if (spf)
sp_close_font(spf);
return err;
}
static FontRendererRec renderer = {
".spd", 4, NULL, SpeedoOpenScalable,
NULL, SpeedoGetInfoScaleable, 0
, CAP_MATRIX | CAP_CHARSUBSETTING
};
void
SpeedoRegisterFontFileFunctions()
{
sp_make_standard_props();
sp_reset();
FontFileRegisterRenderer(&renderer);
}
/* $Xorg: spint.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
* Copyright 1990, 1991 Network Computing Devices;
* Portions Copyright 1987 by Digital Equipment Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Network Computing Devices or Digital
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission.
*
* NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES OR DIGITAL BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.9 2001/01/17 19:43:20 dawes Exp $ */
#ifndef _SPINT_H_
#define _SPINT_H_
#include <X11/fonts/fntfilst.h>
#ifndef XFree86LOADER
#include <stdio.h>
#else
#include <xf86_ansic.h>
#endif
#include <X11/Xfuncproto.h>
#include "speedo.h"
#define SaveMetrics 0x1
#define ComputeBoundsOnly 0x2
#define GLWIDTHBYTESPADDED(bits,nbytes) \
((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \
:(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \
:(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \
:(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
: 0)
#define GLYPH_SIZE(ch, nbytes) \
GLWIDTHBYTESPADDED((ch)->metrics.rightSideBearing - \
(ch)->metrics.leftSideBearing, (nbytes))
#define mincharno(p) ((p).min_char_low + ((p).min_char_high << 8))
#define maxcharno(p) ((p).max_char_low + ((p).max_char_high << 8))
#define MasterFileOpen 0x1
typedef struct _sp_master {
FontEntryPtr entry; /* back pointer */
FILE *fp;
char *fname;
ufix8 *f_buffer;
ufix8 *c_buffer;
char *copyright;
ufix8 *key;
buff_t font;
buff_t char_data;
ufix16 mincharsize;
int first_char_id;
int num_chars;
int max_id;
int state; /* open, closed */
int refcount; /* number of instances */
int *enc;
int enc_size;
} SpeedoMasterFontRec, *SpeedoMasterFontPtr;
typedef struct _cur_font_stats {
fsBitmapFormat format;
/* current glyph info */
ufix16 char_index;
ufix16 char_id;
fix15 bit_width,
bit_height;
fix15 cur_y;
int bpr;
/*
* since Speedo returns extents that are not identical to what it feeds to
* the bitmap builder, and we want to be able to use the extents for
* preformance reasons, some of the bitmaps require padding out. the next
* two flags keep track of this.
*/
fix15 last_y;
int trunc;
pointer bp;
int scanpad;
} CurrentFontValuesRec, *CurrentFontValuesPtr;
typedef struct _sp_font {
struct _sp_master *master;
specs_t specs;
FontEntryPtr entry;
FontScalableRec vals;
/* char & metric data */
CharInfoPtr encoding;
CharInfoPtr pDefault;
pointer bitmaps;
#ifdef DEBUG
unsigned long bitmap_size;
#endif
} SpeedoFontRec, *SpeedoFontPtr;
extern SpeedoFontPtr sp_fp_cur;
extern int sp_open_font(char *, char *, FontEntryPtr, FontScalablePtr,
fsBitmapFormat, fsBitmapFormatMask, Mask,
SpeedoFontPtr *);
extern int sp_open_master(const char *, const char *, SpeedoMasterFontPtr *);
extern void sp_close_font(SpeedoFontPtr);
extern void sp_close_master_font(SpeedoMasterFontPtr);
extern void sp_close_master_file(SpeedoMasterFontPtr);
extern void sp_reset_master(SpeedoMasterFontPtr);
extern void SpeedoErr(char *fmt, ...);
extern void sp_make_standard_props(void);
extern void sp_make_header(SpeedoFontPtr, FontInfoPtr);
extern void sp_compute_bounds(SpeedoFontPtr, FontInfoPtr, unsigned long, long *);
extern void sp_compute_props(SpeedoFontPtr, char *, FontInfoPtr, long);
extern int sp_build_all_bitmaps(FontPtr, fsBitmapFormat, fsBitmapFormatMask);
extern unsigned long sp_compute_data_size(FontPtr, int, int, unsigned long,
unsigned long);
extern int SpeedoFontLoad(FontPtr *, char *, char *, FontEntryPtr,
FontScalablePtr, fsBitmapFormat, fsBitmapFormatMask,
Mask);
extern int sp_bics_map[];
extern int sp_bics_map_size;
#ifdef EXTRAFONTS
extern int adobe_map[];
extern int adobe_map_size;
#endif
#endif /* _SPINT_H_ */
/* $Xorg: useropt.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */
/*
Copyright 1993, 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
#define INCL_LCD 1
#define STATIC_ALLOC 1
#define INCL_BLACK 1
#define INCL_SCREEN 1
#define INCL_2D 1
#define SHORT_LISTS 0
#define INCL_RULES 1
#define INCL_METRICS 1
#define INCL_KEYS 1
/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
*
* The contents of this file are subject to the CID Font Code Public Licence
* Version 1.0 (the "License"). You may not use this file except in compliance
* with the Licence. You may obtain a copy of the License at Silicon Graphics,
* Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA
* 94043 or at http://www.sgi.com/software/opensource/cid/license.html.
*
* Software distributed under the License is distributed on an "AS IS" basis.
* ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
* WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
* NON-INFRINGEMENT. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Software is CID font code that was developed by Silicon
* Graphics, Inc.
*/
#ifdef BUILDCID
#define XFONT_CID 1
#endif
#if XFONT_CID
#ifndef AFM_H
#define AFM_H
/* Bounding box definition. Used for the Font BBox as well as the
* Character BBox.
*/
typedef struct
{
int llx; /* lower left x-position */
int lly; /* lower left y-position */
int urx; /* upper right x-position */
int ury; /* upper right y-position */
} BBox;
/* Character Metric Information. This structure is used only if ALL
* character metric information is requested. If only the character
* widths is requested, then only an array of the character x-widths
* is returned.
*
* The key that each field is associated with is in comments. For an
* explanation about each key and its value please refer to the
* Character Metrics section of the AFM documentation (full title
* & version given above).
*/
typedef struct
{
long code; /* CID code */
int wx; /* key: WX or W0X */
BBox charBBox; /* key: B */
} Metrics;
typedef struct
{
int nChars; /* number of entries in char metrics array */
Metrics *metrics; /* ptr to char metrics array */
} FontInfo;
int CIDAFM(FILE *, FontInfo **);
#endif /* AFM_H */
#endif
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:28 cpqbld Exp $
XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.12 2002/02/13 21:32:48 dawes Exp $
#if BuildServer && DoLoadableServer
#define IHaveSubdirs
#define NoLibSubdirs
#define PassCDebugFlags
SUBDIRS = module
#endif
INCLUDES = -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \
-I$(SERVERSRC)/include
#if BuildCID
CIDSRCS = cidchar.c afm.c
CIDOBJS = cidchar.o afm.o
#if HasUsableFileMmap
MMAPDEFINES = -DUSE_MMAP
#endif
DEFINES = -DBUILDCID -DHAVE_CFM $(MMAPDEFINES)
#endif
SRCS = \
arith.c \
curves.c \
fontfcn.c \
hints.c \
lines.c \
objects.c \
paths.c \
regions.c \
scanfont.c \
spaces.c \
t1funcs.c \
t1info.c \
t1io.c \
t1malloc.c \
t1snap.c \
t1stub.c \
token.c \
type1.c \
util.c \
$(CIDSRCS) \
t1unicode.c
OBJS = \
arith.o \
curves.o \
fontfcn.o \
hints.o \
lines.o \
objects.o \
paths.o \
regions.o \
scanfont.o \
spaces.o \
t1funcs.o \
t1info.o \
t1io.o \
t1malloc.o \
t1snap.o \
t1stub.o \
token.o \
type1.o \
util.o \
$(CIDOBJS) \
t1unicode.o
#if BuildFontLib
#define DoNormalLib NormalLibFont
#define DoSharedLib SharedLibFont
#define DoDebugLib DebugLibFont
#define DoProfileLib ProfileLibFont
#include <Library.tmpl>
LibraryObjectRule()
SubdirLibraryRule($(OBJS))
NormalLintTarget($(SRCS))
#endif
#if BuildServer && DoLoadableServer
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
#endif
DependTarget()
/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
*
* The contents of this file are subject to the CID Font Code Public Licence
* Version 1.0 (the "License"). You may not use this file except in compliance
* with the Licence. You may obtain a copy of the License at Silicon Graphics,
* Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA
* 94043 or at http://www.sgi.com/software/opensource/cid/license.html.
*
* Software distributed under the License is distributed on an "AS IS" basis.
* ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
* WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
* NON-INFRINGEMENT. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Software is CID font code that was developed by Silicon
* Graphics, Inc.
*/
/* $XFree86: xc/lib/font/Type1/afm.c,v 1.2 1999/08/21 13:47:38 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef BUILDCID
#define XFONT_CID 1
#endif
#ifdef XFONT_CID
#ifndef FONTMODULE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#else
#include "Xmd.h" /* For INT32 declaration */
#include "Xdefs.h" /* For Bool */
#include "xf86_ansic.h"
#endif
#include <X11/fonts/fontmisc.h> /* for xalloc/xfree */
#include "AFM.h"
#define PBUF 256
#define KBUF 20
char *gettoken(FILE *);
static char *afmbuf = NULL;
char *gettoken(FILE *fd) {
char *bp;
int c, found;
bp = afmbuf;
found = 0;
while((c = getc(fd)) != EOF) {
if (found == 0 && (c == ' ' || c == '\t' || c == '\n' || c == '\r' ||
c == ';' || c == ',')) continue;
found = 1;
if (c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ';') {
*bp++ = c;
if (bp - afmbuf >= PBUF) {
bp = afmbuf;
break;
}
} else
break;
}
*bp = 0;
return(afmbuf);
}
int CIDAFM(FILE *fd, FontInfo **pfi) {
char *p = 0;
int i, j, k = 0, found = 0;
FontInfo *fi;
if (fd == NULL || pfi == NULL) return(1);
*pfi = NULL;
if ((afmbuf = (char *)xalloc(PBUF)) == NULL)
return(1);
while(1) {
if (!(p = gettoken(fd))) {
xfree(afmbuf);
return(1);
}
if (strncmp(p, "StartFontMetrics", 16) == 0) {
if (!(p = gettoken(fd))) {
xfree(afmbuf);
return(1);
}
if (strncmp(p, "4", 1) < 0) {
free(afmbuf);
return(1);
}
found = 1;
} else if (strncmp(p, "StartCharMetrics", 16) == 0) {
if (!found) {
xfree(afmbuf);
return(1);
}
if (!(p = gettoken(fd))) {
xfree(afmbuf);
return(1);
}
fi = (FontInfo *)xalloc(sizeof(FontInfo));
if (fi == NULL) {
xfree(afmbuf);
return(1);
}
bzero(fi, sizeof(FontInfo));
fi->nChars = atoi(p);
if (fi->nChars < 0 || fi->nChars > INT_MAX / sizeof(Metrics)) {
xfree(afmbuf);
xfree(fi);
return(1);
}
fi->metrics = (Metrics *)xalloc(fi->nChars *
sizeof(Metrics));
if (fi->metrics == NULL) {
xfree(afmbuf);
xfree(fi);
return(1);
}
j = 0;
for (i = 0; i < fi->nChars; i++) {
k = 0;
while(1) {
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
if (strncmp(p, "W0X", 3) == 0) {
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].wx = atoi(p);
} else if (strncmp(p, "N", 1) == 0) {
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].code = (long)atoi(p);
} else if (strncmp(p, "B", 1) == 0) {
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].charBBox.llx = atoi(p);
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].charBBox.lly = atoi(p);
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].charBBox.urx = atoi(p);
if (!(p = gettoken(fd))) {
k = KBUF;
break;
}
fi->metrics[j].charBBox.ury = atoi(p);
j++;
break;
}
k++;
if (k >= KBUF) break;
}
if (k >= KBUF) break;
}
if (k >= KBUF || j != fi->nChars) {
xfree(fi->metrics);
xfree(fi);
xfree(afmbuf);
return(1);
} else {
*pfi = fi;
xfree(afmbuf);
return(0);
}
}
}
xfree(afmbuf);
return(1);
}
#endif
/* $Xorg: arith.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines, Corp. 1991
* All Rights Reserved
* Copyright Lexmark International, Inc. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of IBM or Lexmark not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF
* ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
* AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE
* QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE
* SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE
* ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL
* IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
/* $XFree86: xc/lib/font/Type1/arith.h,v 1.4 1999/08/21 13:47:39 dawes Exp $ */
/*SHARED*/
#include <X11/Xmd.h> /* LONG64 */
/*END SHARED*/
/*SHARED*/
#undef SHORTSIZE
#define SHORTSIZE (sizeof(short)*8)
#undef LONGSIZE
#define LONGSIZE (SHORTSIZE*2)
#undef MAXSHORT
#define MAXSHORT ((1<<SHORTSIZE)-1)
/*END SHARED*/
/*SHARED*/
#ifdef LONG64
typedef long doublelong;
#else
typedef struct {
long high;
unsigned long low;
} doublelong;
#endif /* LONG64 else */
/*END SHARED*/
/*SHARED*/
#ifdef LONG64
#define DLrightshift(dl,N) ((dl) >>= (N))
#else
#define DLrightshift(dl,N) { \
dl.low = (dl.low >> N) + (((unsigned long) dl.high) << (LONGSIZE - N)); \
dl.high >>= N; \
}
#endif
extern void DLmult ( doublelong *product, unsigned long u, unsigned long v );
extern void DLdiv ( doublelong *quotient, unsigned long divisor );
extern void DLadd ( doublelong *u, doublelong *v );
extern void DLsub ( doublelong *u, doublelong *v );
extern fractpel FPmult ( fractpel u, fractpel v );
extern fractpel FPdiv ( fractpel dividend, fractpel divisor );
extern fractpel FPstarslash ( fractpel a, fractpel b, fractpel c );
/*END SHARED*/
/* $Xorg: blues.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines, Corp. 1991
* All Rights Reserved
* Copyright Lexmark International, Inc. 1991
* All Rights Reserved
* Portions Copyright (c) 1990 Adobe Systems Incorporated.
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of IBM or Lexmark or Adobe
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission.
*
* IBM, LEXMARK, AND ADOBE PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY
* WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE
* ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING
* ANY DUTY TO SUPPORT OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY
* PORTION OF THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM,
* LEXMARK, OR ADOBE) ASSUMES THE ENTIRE COST OF ALL SERVICING, REPAIR AND
* CORRECTION. IN NO EVENT SHALL IBM, LEXMARK, OR ADOBE BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $XFree86: xc/lib/font/Type1/blues.h,v 1.3 1999/08/22 08:58:49 dawes Exp $ */
extern psobj *GetType1CharString ( psfont *fontP, unsigned char code );
#define TOPLEFT 1
#define BOTTOMRIGHT 2
#define NUMBLUEVALUES 14
#define NUMOTHERBLUES 10
#define NUMFAMILYBLUES 14
#define NUMFAMILYOTHERBLUES 10
#define NUMSTEMSNAPH 12
#define NUMSTEMSNAPV 12
#define NUMSTDHW 1
#define NUMSTDVW 1
#define DEFAULTBOLDSTEMWIDTH 2.0
#define MAXALIGNMENTZONES ((NUMBLUEVALUES+NUMOTHERBLUES)/2)
#define DEFAULTBLUESCALE 0.039625
#define DEFAULTBLUESHIFT 7
#define DEFAULTBLUEFUZZ 1
#define DEFAULTSTDHW 0
#define DEFAULTSTDVW 0
#define DEFAULTFORCEBOLD FALSE
#define DEFAULTLANGUAGEGROUP 0
#define DEFAULTRNDSTEMUP FALSE
#define DEFAULTLENIV 4
#define DEFAULTEXPANSIONFACTOR 0.06
/* see Type 1 Font Format book for explanations of these values */
/* Note that we're currently doing nothing for minfeature and password. */
struct blues_struct {
struct blues_struct *next; /* ptr to next Blues structure in list */
int numBlueValues; /* # of BlueValues in following array */
int BlueValues[NUMBLUEVALUES];
int numOtherBlues; /* # of OtherBlues values in following array */
int OtherBlues[NUMOTHERBLUES];
int numFamilyBlues; /* # of FamilyBlues values in following array */
int FamilyBlues[NUMFAMILYBLUES];
int numFamilyOtherBlues; /* # of FamilyOtherBlues values in */
int FamilyOtherBlues[NUMFAMILYOTHERBLUES]; /* this array */
double BlueScale;
int BlueShift;
int BlueFuzz;
double StdHW;
double StdVW;
int numStemSnapH; /* # of StemSnapH values in following array */
double StemSnapH[NUMSTEMSNAPH];
int numStemSnapV; /* # of StemSnapV values in following array */
double StemSnapV[NUMSTEMSNAPV];
int ForceBold;
int LanguageGroup;
int RndStemUp;
int lenIV;
double ExpansionFactor;
};
/* the alignment zone structure -- somewhat similar to the stem structure */
/* see Adobe Type1 Font Format book about the terms used in this structure */
struct alignmentzone {
int topzone; /* TRUE if a topzone, FALSE if a bottom zone */
double bottomy, topy; /* interval of this alignment zone */
};
/* $Xorg: cluts.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is
* hereby granted, provided that the above copyright notice
* appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation,
* and that the name of IBM not be used in advertising or
* publicity pertaining to distribution of the software without
* specific, written prior permission.
*
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* STUB */
#define KillCLUT(T)
#define CopyCLUT(T) T
#define UniqueCLUT(T)
/* $Xorg: curves.c,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991 */
/* All Rights Reserved */
/* License to use, copy, modify, and distribute this software */
/* and its documentation for any purpose and without fee is */
/* hereby granted, provided that licensee provides a license to */
/* IBM, Corp. to use, copy, modify, and distribute derivative */
/* works and their documentation for any purpose and without */
/* fee, that the above copyright notice appear in all copies */
/* and that both that copyright notice and this permission */
/* notice appear in supporting documentation, and that the name */
/* of IBM not be used in advertising or publicity pertaining to */
/* distribution of the software without specific, written prior */
/* permission. */
/* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES */
/* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT */
/* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, */
/* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF */
/* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND */
/* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT */
/* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF */
/* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES */
/* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN */
/* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR */
/* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING */
/* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF */
/* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT */
/* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */
/* SOFTWARE. */
/* $XFree86: xc/lib/font/Type1/curves.c,v 1.7 2001/08/27 19:49:52 dawes Exp $ */
/*
:h1.CURVES Module - Stepping Beziers
This module is responsible for "rasterizing"
third order curves. That is, it changes the high level curve
specification into a list of pels that that curve travels
through.
:h3.Include Files
Include files needed:
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef FONTMODULE
# include "os.h"
#endif
#include "objects.h"
#include "spaces.h"
#include "paths.h"
#include "regions.h"
#include "curves.h"
#include "lines.h"
#include "arith.h"
/*
:h3.Functions Provided to Other Modules
External entry points:
*/
/*SHARED LINE(S) ORIGINATED HERE*/
/*
Note that "stepping" and "flattening" are so similiar that they use the
same routine. When the "region" parameter is NULL, that is a flag that
we are flattening instead of stepping.
*/
/*
:h2.Bezier Third Order Curves
*/
/*
:h3.The "bezierinfo" Structure
This structure is used to store information used when we subdivide
Bezier curves.
*/
struct bezierinfo {
struct region *region; /* the region being built or NULL */
struct fractpoint last; /* not used yet; maybe could save some work */
struct fractpoint origin; /* the origin of the bezier */
} ;
/*
Checking for termination of the subdivision process:
This is the stupidest test in the world, just check if the coordinatewise
distance from an end control point to the next control point is less than
one half pel. If so, we must be done.
This returns 1 if the subdivision is terminated and 0 if you still need
to subdivide.
*/
static int
BezierTerminationTest(fractpel xa, fractpel ya,
fractpel xb, fractpel yb,
fractpel xc, fractpel yc,
fractpel xd, fractpel yd)
{
fractpel dmax;
dmax = ABS(xa - xb);
dmax = MAX(dmax,ABS(ya - yb));
dmax = MAX(dmax,ABS(xd - xc));
dmax = MAX(dmax,ABS(yd - yc));
if(dmax > FPHALF)
return(0); /* not done yet */
else
return(1); /* done */
}
/*
:h3.StepBezierRecurse() - The Recursive Logic in StepBezier()
The recursion involves dividing the control polygon into two smaller
control polygons by finding the midpoints of the lines. This idea is
described in any graphics text book and its simplicity is what caused
Bezier to define his curves as he did. If the input region 'R' is NULL,
the result is a path that is the 'flattened' curve; otherwise StepBezier
returns nothing special.
*/
static struct segment *
StepBezierRecurse(struct bezierinfo *I, /* Region under construction or NULL */
fractpel xA, fractpel yA, /* A control point */
fractpel xB, fractpel yB, /* B control point */
fractpel xC, fractpel yC, /* C control point */
fractpel xD, fractpel yD) /* D control point */
{
if (BezierTerminationTest(xA,yA,xB,yB,xC,yC,xD,yD))
{
if (I->region == NULL)
return(PathSegment(LINETYPE, xD - xA, yD - yA));
else
StepLine(I->region, I->origin.x + xA, I->origin.y + yA,
I->origin.x + xD, I->origin.y + yD);
}
else
{
fractpel xAB,yAB;
fractpel xBC,yBC;
fractpel xCD,yCD;
fractpel xABC,yABC;
fractpel xBCD,yBCD;
fractpel xABCD,yABCD;
xAB = xA + xB; yAB = yA + yB;
xBC = xB + xC; yBC = yB + yC;
xCD = xC + xD; yCD = yC + yD;
xABC = xAB + xBC; yABC = yAB + yBC;
xBCD = xBC + xCD; yBCD = yBC + yCD;
xABCD = xABC + xBCD; yABCD = yABC + yBCD;
xAB >>= 1; yAB >>= 1;
xBC >>= 1; yBC >>= 1;
xCD >>= 1; yCD >>= 1;
xABC >>= 2; yABC >>= 2;
xBCD >>= 2; yBCD >>= 2;
xABCD >>= 3; yABCD >>= 3;
if (I->region == NULL)
{
return( Join(
StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD),
StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD)
)
);
}
else
{
StepBezierRecurse(I, xA, yA, xAB, yAB, xABC, yABC, xABCD, yABCD);
StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD);
}
}
return NULL;
/*NOTREACHED*/
}
/*
:h3.TOOBIG() - Macro to Test if a Coordinate is Too Big to Bezier SubDivide Normally
Intermediate values in the Bezier subdivision are 8 times bigger than
the starting values. If this overflows, a 'long', we are in trouble:
*/
#undef BITS
#define BITS (sizeof(long)*8)
#define HIGHTEST(p) (((p)>>(BITS-4)) != 0) /* includes sign bit */
#define TOOBIG(xy) ((xy < 0) ? HIGHTEST(-xy) : HIGHTEST(xy))
/*
:h3.StepBezier() - Produce Run Ends for a Bezier Curve
This is the entry point called from outside the module.
*/
struct segment *
StepBezier(struct region *R, /* Region under construction or NULL */
fractpel xA, fractpel yA, /* A control point */
fractpel xB, fractpel yB, /* B control point */
fractpel xC, fractpel yC, /* C control point */
fractpel xD, fractpel yD) /* D control point */
{
struct bezierinfo Info;
Info.region = R;
Info.origin.x = xA;
Info.origin.y = yA;
xB -= xA;
xC -= xA;
xD -= xA;
yB -= yA;
yC -= yA;
yD -= yA;
if ( TOOBIG(xB) || TOOBIG(yB) || TOOBIG(xC) || TOOBIG(yC)
|| TOOBIG(xD) || TOOBIG(yD) )
Abort("Beziers this big not yet supported");
return(StepBezierRecurse(&Info,
(fractpel) 0, (fractpel) 0, xB, yB, xC, yC, xD, yD));
}
/* $Xorg: curves.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines, Corp. 1991
* All Rights Reserved
* Copyright Lexmark International, Inc. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of IBM or Lexmark not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* IBM AND LEXMARK PROVIDE THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES OF
* ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO ANY
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
* AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE
* QUALITY AND PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF THE
* SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM OR LEXMARK) ASSUMES THE
* ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN NO EVENT SHALL
* IBM OR LEXMARK BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
/* $XFree86: xc/lib/font/Type1/curves.h,v 1.3 1999/08/22 08:58:50 dawes Exp $ */
/*SHARED*/
#define StepConic(R,xA,yA,xB,yB,xC,yC,r) t1_StepConic(R,xA,yA,xB,yB,xC,yC,r)
#define StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD) t1_StepBezier(R,xA,yA,xB,yB,xC,yC,xD,yD)
#define FlattenConic(xM,yM,xC,yC,r) t1_StepConic(NULL,(fractpel)0,(fractpel)0,xM,yM,xC,yC,r)
#define FlattenBezier(xB,yB,xC,yC,xD,yD) t1_StepBezier(NULL,(fractpel)0,(fractpel)0,xB,yB,xC,yC,xD,yD)
#if 0
struct segment *t1_StepConic();
#endif
extern struct segment *t1_StepBezier ( struct region *R, fractpel xA, fractpel yA, fractpel xB, fractpel yB, fractpel xC, fractpel yC, fractpel xD, fractpel yD );
/*END SHARED*/
/* $Xorg: digit.h,v 1.3 2000/08/17 19:46:29 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is
* hereby granted, provided that the above copyright notice
* appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation,
* and that the name of IBM not be used in advertising or
* publicity pertaining to distribution of the software without
* specific, written prior permission.
*
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* -------------------------------------- */
/* --- MACHINE GENERATED, DO NOT EDIT --- */
/* -------------------------------------- */
#ifndef DIGIT
#define DIGIT 1
/*
* Digit Value Table --
*
* The entries in the Digit Value Table map character
* codes in the set {0-9,a-z,A-Z} to their numeric
* values as part of numbers of radix 2-36.
*
*/
unsigned char digit_value[256] = {
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,
0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,
0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
};
#endif
/* $Xorg: fontfcn.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is
* hereby granted, provided that the above copyright notice
* appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation,
* and that the name of IBM not be used in advertising or
* publicity pertaining to distribution of the software without
* specific, written prior permission.
*
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
*
* The contents of this file are subject to the CID Font Code Public Licence
* Version 1.0 (the "License"). You may not use this file except in compliance
* with the Licence. You may obtain a copy of the License at Silicon Graphics,
* Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA
* 94043 or at http://www.sgi.com/software/opensource/cid/license.html.
*
* Software distributed under the License is distributed on an "AS IS" basis.
* ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
* WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
* NON-INFRINGEMENT. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Software is CID font code that was developed by Silicon
* Graphics, Inc.
*/
/* $XFree86: xc/lib/font/Type1/fontfcn.h,v 1.4 1999/08/22 08:58:50 dawes Exp $ */
#ifdef BUILDCID
#define XFONT_CID 1
#endif
/* modular config.h defines VERSION as libXfont version */
#ifdef VERSION
#undef VERSION
#endif
#if XFONT_CID
/* Definition of a PostScript CIDFont resource */
typedef struct cid_font {
char *vm_start;
int spacerangecnt;
int notdefrangecnt;
int cidrangecnt;
spacerange *spacerangeP;
cidrange *notdefrangeP;
cidrange *cidrangeP;
int binarydata; /* 1=binary data, 0=hex data */
long bytecnt;
psobj CIDFontFileName;
psdict *CIDfontInfoP;
} cidfont;
/* Definition of a PostScript CMap resource */
typedef struct cmap_res {
unsigned short firstCol;
unsigned short lastCol;
unsigned short firstRow;
unsigned short lastRow;
psobj CMapFileName;
psdict *CMapInfoP;
} cmapres;
#endif
/* Definition of a PostScript FONT */
typedef struct ps_font {
char *vm_start;
psobj FontFileName;
psobj Subrs;
psdict *CharStringsP;
psdict *Private;
psdict *fontInfoP;
struct blues_struct *BluesP;
} psfont;
/***================================================================***/
/* Routines in scan_font */
/***================================================================***/
extern boolean Init_BuiltInEncoding ( void );
#if XFONT_CID
extern int scan_cidfont ( cidfont *CIDFontP, cmapres *CMapP );
extern int scan_cidtype1font ( psfont *FontP );
#endif
extern int scan_font ( psfont *FontP );
/***================================================================***/
/* Return codes from scan_font */
/***================================================================***/
#define SCAN_OK 0
#define SCAN_FILE_EOF -1
#define SCAN_ERROR -2
#define SCAN_OUT_OF_MEMORY -3
#define SCAN_FILE_OPEN_ERROR -4
#define SCAN_TRUE -5
#define SCAN_FALSE -6
#define SCAN_END -7
#if XFONT_CID
/***================================================================***/
/* Name of CID FontInfo fields */
/***================================================================***/
#define CIDCOUNT 1
#define CIDFONTNAME 2
#define CIDFONTTYPE 3
#define CIDVERSION 4
#define CIDREGISTRY 5
#define CIDORDERING 6
#define CIDSUPPLEMENT 7
#define CIDMAPOFFSET 8
#define CIDFDARRAY 9
#define CIDFDBYTES 10
#define CIDFONTBBOX 11
#define CIDFULLNAME 12
#define CIDFAMILYNAME 13
#define CIDWEIGHT 14
#define CIDNOTICE 15
#define CIDGDBYTES 16
#define CIDUIDBASE 17
#define CIDXUID 18
/***================================================================***/
/* Name of CMapInfo fields */
/***================================================================***/
#define CMAPREGISTRY 1
#define CMAPORDERING 2
#define CMAPSUPPLEMENT 3
#define CMAPNAME 4
#define CMAPVERSION 5
#define CMAPTYPE 6
#define CMAPWMODE 7
#define CMAPCIDCOUNT 8
#endif
/***================================================================***/
/* Name of FontInfo fields */
/***================================================================***/
#define FONTNAME 1
#define PAINTTYPE 2
#define FONTTYPENUM 3
#define FONTMATRIX 4
#define FONTBBOX 5
#define UNIQUEID 6
#define STROKEWIDTH 7
#define VERSION 8
#define NOTICE 9
#define FULLNAME 10
#define FAMILYNAME 11
#define WEIGHT 12
#define ITALICANGLE 13
#define ISFIXEDPITCH 14
#define UNDERLINEPOSITION 15
#define UNDERLINETHICKNESS 16
#define ENCODING 17
/***================================================================***/
/* Name of Private values */
/***================================================================***/
#define BLUEVALUES 1
#define OTHERBLUES 2
#define FAMILYBLUES 3
#define FAMILYOTHERBLUES 4
#define BLUESCALE 5
#define BLUESHIFT 6
#define BLUEFUZZ 7
#define STDHW 8
#define STDVW 9
#define STEMSNAPH 10
#define STEMSNAPV 11
#define FORCEBOLD 12
#define LANGUAGEGROUP 13
#define LENIV 14
#define RNDSTEMUP 15
#define EXPANSIONFACTOR 16
#if XFONT_CID
/***================================================================***/
/* Name of CID Type 1 Private values */
/***================================================================***/
#define CIDT1MINFEATURE 1
#define CIDT1LENIV 2
#define CIDT1LANGGROUP 3
#define CIDT1BLUEVALUES 4
#define CIDT1OTHERBLUES 5
#define CIDT1BLUESCALE 6
#define CIDT1BLUEFUZZ 7
#define CIDT1BLUESHIFT 8
#define CIDT1FAMBLUES 9
#define CIDT1FAMOTHERBLUES 10
#define CIDT1STDHW 11
#define CIDT1STDVW 12
#define CIDT1STEMSNAPH 13
#define CIDT1STEMSNAPV 14
#define CIDT1SUBMAPOFF 15
#define CIDT1SDBYTES 16
#define CIDT1SUBRCNT 17
#define CIDT1FORCEBOLD 18
#define CIDT1RNDSTEMUP 19
#define CIDT1EXPFACTOR 20
#define CID_BITMAP_UNDEFINED 0
extern int SearchDictName ( psdict *dictP, psobj *keyP );
#if XFONT_CID
extern boolean initCIDType1Font ( void );
#endif
extern boolean initFont ( int cnt );
#if XFONT_CID
extern int readCIDFont ( char *cidfontname, char *cmapfile );
extern int readCIDType1Font ( void );
#endif
extern int readFont ( char *env );
extern struct xobject *fontfcnB ( struct XYspace *S, unsigned char *code,
int *lenP, int *mode );
#if XFONT_CID
extern Bool CIDfontfcnA ( char *cidfontname, char *cmapfile, int *mode );
extern Bool CIDType1fontfcnA ( int *mode );
#endif
extern Bool fontfcnA ( char *env, int *mode );
#if XFONT_CID
extern void CIDQueryFontLib ( char *cidfontname, char *cmapfile,
char *infoName, pointer infoValue, int *rcodeP );
#endif
extern void QueryFontLib ( char *env, char *infoName, pointer infoValue,
int *rcodeP );
#if XFONT_CID
extern struct xobject *CIDfontfcnC ( struct XYspace *S, psobj *theStringP,
psobj *SubrsArrayP,
struct blues_struct *BluesP, int *lenP,
int *mode );
#endif
#endif
/* $Xorg: fonts.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is
* hereby granted, provided that the above copyright notice
* appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation,
* and that the name of IBM not be used in advertising or
* publicity pertaining to distribution of the software without
* specific, written prior permission.
*
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* STUB */
#define CopyFont(f) f
#define UniqueFont(f) f
#define KillFont(f)
#define KillText(t)
#define CopyText(t) t
#define I_DumpText(t)
#define CoerceText(t) t
#define TextDelta(t,pt)
#define XformText(p,s)
#define GimeSpace() FALSE
#define LibInit()
#define InitFonts()
#define InitFiles()
#define TraceClose()
#define FF_PARSE_ERROR -1
/* $Xorg: hdigit.h,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */
/* Copyright International Business Machines,Corp. 1991
* All Rights Reserved
*
* License to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is
* hereby granted, provided that the above copyright notice
* appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation,
* and that the name of IBM not be used in advertising or
* publicity pertaining to distribution of the software without
* specific, written prior permission.
*
* IBM PROVIDES THIS SOFTWARE "AS IS", WITHOUT ANY WARRANTIES
* OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
* LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND
* PERFORMANCE OF THE SOFTWARE, INCLUDING ANY DUTY TO SUPPORT
* OR MAINTAIN, BELONGS TO THE LICENSEE. SHOULD ANY PORTION OF
* THE SOFTWARE PROVE DEFECTIVE, THE LICENSEE (NOT IBM) ASSUMES
* THE ENTIRE COST OF ALL SERVICING, REPAIR AND CORRECTION. IN
* NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/* -------------------------------------- */
/* --- MACHINE GENERATED, DO NOT EDIT --- */
/* -------------------------------------- */
#ifndef HDIGIT
#define HDIGIT 1
/*
* Hex Digit Value Table --
*
* The entries in the Digit Value Table map character codes in the set
* {0-9,a-f,A-F} to their numeric values for readhexstring
* (00 10...F0 for the high hex digit and 00 01...0F for the low).
* The white-space and hex string termination characters are.
* mapped to codes > 0xf0 to enable usage by several modules.
* 2 tables are build HighHex and LowHex.
*
*/
/* Indicators for special characters in these tables */
#define HERROR (0xfe)
#define HWHITE_SPACE (0xfd)
#define HRIGHT_ANGLE (0xfc)
#define LAST_HDIGIT (0xf0)
#define HighHexP (HighHex+1)
unsigned char HighHex[257] = { 0xFF,
0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,0x80,0x90,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE,
0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xA0,0xB0,0xC0,0xD0,0xE0,0xF0,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE
};
#define LowHexP (LowHex+1)
unsigned char LowHex[257] = { 0xFF,
0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFD,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0xFE,0xFE,0xFE,0xFE,0xFC,0xFE,
0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE
};
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment