📄 speedo.h
字号:
/* $XConsortium: speedo.h,v 1.7 95/06/08 23:20:39 gildea Exp $ *//*Copyright 1989-1991, Bitstream Inc., Cambridge, MA.You are hereby granted permission under all Bitstream propriety rights touse, copy, modify, sublicense, sell, and redistribute the Bitstream Speedosoftware and the Bitstream Charter outline font for any purpose and withoutrestrictions; provided, that this notice is left intact on all copies of suchsoftware or font and that Bitstream's trademark is acknowledged as shown belowon 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, INCLUDINGWITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR APARTICULAR PURPOSE. BITSTREAM SHALL NOT BE LIABLE FOR ANY DIRECT OR INDIRECTDAMAGES, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST DATA, OR ANY OTHERINCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR IN ANY WAY CONNECTEDWITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT.*/#ifndef _SPEEDO_H_#define _SPEEDO_H_#include <X11/Xmd.h>/***************************** S P E E D O . H ******************************* ****************************************************************************//***** USER OPTIONS OVERRIDE DEFAULTS ******/#include "useropt.h"/***** CONFIGURATION DEFINITIONS *****/#ifndef INCL_CLIPPING#define INCL_CLIPPING 0 /* 0 indicates CLIPPING code is not compiled in*/#endif#ifndef INCL_SQUEEZING#define INCL_SQUEEZING 0 /* 0 indicates SQUEEZE code is not compiled in*/#endif#ifndef INCL_EXT#define INCL_EXT 1 /* 1 to include extended font support */#endif /* 0 to omit extended font support */#ifndef INCL_RULES#define INCL_RULES 1 /* 1 to include intelligent scaling support */#endif /* 0 to omit intelligent scaling support */#ifndef INCL_BLACK #define INCL_BLACK 1 /* 1 to include blackwriter output support */#endif /* 0 to omit output mode 0 support */#ifndef INCL_SCREEN#define INCL_SCREEN 0 /* 1 to include screen writeroutput support */#endif /* 0 to omit support */#ifndef INCL_OUTLINE#define INCL_OUTLINE 0 /* 1 to include outline output support */#endif /* 0 to omit output mode 2 support */#ifndef INCL_2D#define INCL_2D 0 /* 1 to include 2d blackwriter output support */#endif /* 0 to omit output mode 3 support */#ifndef INCL_USEROUT#define INCL_USEROUT 0 /* 1 to include user defined output module support */#endif /* 0 to omit user defined output module support */#ifndef INCL_LCD#define INCL_LCD 1 /* 1 to include load char data support*/#endif /* 0 to omit load char data support */#ifndef INCL_ISW#define INCL_ISW 0 /* 1 to include imported width support */#endif /* 0 to omit imported width support */#ifndef INCL_METRICS#define INCL_METRICS 1 /* 1 to include metrics support */#endif /* 0 to omit metrics support */#ifndef INCL_KEYS#define INCL_KEYS 0 /* 1 to include multi key support */#endif /* 0 to omit multi key support */#ifndef INCL_MULTIDEV#define INCL_MULTIDEV 0 /* 1 to include multiple output device support */#endif /* 0 to omit multi device support */#ifndef SHORT_LISTS#define SHORT_LISTS 1 /* 1 to allocate small intercept lists */#endif#ifndef PROTOS_AVAIL /* 1 to use function prototyping */#define PROTOS_AVAIL 0 /* 0 to suppress it */#endif#ifndef FONTFAR /* if Intel mixed memory model implementation */#define FONTFAR /* pointer type modifier for font buffer */#endif#ifndef STACKFAR /* if Intel mixed memory model implementation */#define STACKFAR /* pointer type modifier for font buffer */#endif#ifndef GLOBALFAR#define GLOBALFAR#endif #define MODE_BLACK 0#define MODE_SCREEN MODE_BLACK + INCL_BLACK#define MODE_OUTLINE MODE_SCREEN + INCL_SCREEN#define MODE_2D MODE_OUTLINE + INCL_OUTLINE#ifdef DYNAMIC_ALLOC#if DYNAMIC_ALLOC #define STATIC_ALLOC 0#endif#endif#ifdef REENTRANT_ALLOC#if REENTRANT_ALLOC #define STATIC_ALLOC 0#endif#endif#ifndef STATIC_ALLOC#define STATIC_ALLOC 1#endif#ifndef DYNAMIC_ALLOC#define DYNAMIC_ALLOC 0#endif#ifndef REENTRANT_ALLOC#define REENTRANT_ALLOC 0#endif/***** TYPE DEFINITIONS *****/#ifndef STDEF#ifndef SPD_BMAPtypedef INT8 fix7;typedef double real;typedef CARD8 ufix8;#ifndef VFONTtypedef CARD8 boolean;#endif#endiftypedef INT16 fix15;typedef CARD16 ufix16;typedef INT32 fix31;typedef CARD32 ufix32;#endif/***** GENERAL CONSTANTS *****/#ifndef FALSE#define FALSE 0#define TRUE 1#endif#ifndef NULL#define NULL 0#endif#define FUNCTION#define BIT0 0x01#define BIT1 0x02#define BIT2 0x04#define BIT3 0x08#define BIT4 0x10#define BIT5 0x20#define BIT6 0x40#define BIT7 0x80#if INCL_EXT /* Extended fonts supported? */#define MAX_CONSTR 750 /* Max constraints (incl 4 dummies) */#define MAX_CTRL_ZONES 256 /* Max number of controlled orus */#define MAX_INT_ZONES 256 /* Max number of interpolation zones */#else /* Compact fonts only supported */#define MAX_CONSTR 512 /* Max constraints (incl 4 dummies) */#define MAX_CTRL_ZONES 64 /* Max number of controlled orus */#define MAX_INT_ZONES 64 /* Max number of interpolation zones */#endif#define SCALE_SHIFT 12 /* Binary point positiion for scale values */#define SCALE_RND 2048 /* Rounding bit for scaling transformation */#define ONE_SCALE 4096 /* Unity scale value */ #ifdef INCL_SCREEN /* constants used by Screenwriter module */#define LEFT_INT 1 /* left intercept */#define END_INT 2 /* last intercept */#define FRACTION 0xFC /* fractional portion of intercept type list */#endif#if INCL_SQUEEZING || INCL_CLIPPING /* constants used by SQUEEZEing code */#define EM_TOP 764#define EM_BOT -236#endif/***** STRUCTURE DEFINITIONS *****/#if PROTOS_AVAIL#if REENTRANT_ALLOC#define PROTO_DECL1 struct speedo_global_data GLOBALFAR *sp_global_ptr#define PROTO_DECL2 PROTO_DECL1 ,#else#define PROTO_DECL1 void#define PROTO_DECL2#endif#endiftypedefstruct buff_tag { ufix8 FONTFAR *org; /* Pointer to start of buffer */ ufix32 no_bytes; /* Size of buffer in bytes */ } buff_t; /* Buffer descriptor */typedef struct constr_tag { ufix8 FONTFAR *org; /* Pointer to first byte in constr data */ ufix16 font_id; /* Font id for calculated data */ fix15 xppo; /* X pixels per oru for calculated data */ fix15 yppo; /* Y pixels per oru for calculated data */ boolean font_id_valid; /* TRUE if font id valid */ boolean data_valid; /* TRUE if calculated data valid */ boolean active; /* TRUE if constraints enabled */ } constr_t; /* Constraint data state */typedef struct kern_tag { ufix8 FONTFAR *tkorg; /* First byte of track kerning data */ ufix8 FONTFAR *pkorg; /* First byte of pair kerning data */ fix15 no_tracks; /* Number of kerning tracks */ fix15 no_pairs; /* Number of kerning pairs */ } kern_t; /* Kerning control block */typedef struct specs_tag { buff_t STACKFAR *pfont; /* Pointer to font data */ fix31 xxmult; /* Coeff of X orus to compute X pix */ fix31 xymult; /* Coeff of Y orus to compute X pix */ fix31 xoffset; /* Constant to compute X pix */ fix31 yxmult; /* Coeff of X orus to compute Y pix */ fix31 yymult; /* Coeff of Y orus to compute Y pix */ fix31 yoffset; /* Constant to compute Y pix */ ufix32 flags; /* Mode flags: */ /* Bit 0 - 2: Output module selector: */ /* Bit 3: Send curves to output module*/ /* Bit 4: Use linear scaling if set */ /* Bit 5: Inhibit constraint table */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -