📄 speedo.h
字号:
boolean (*end_char)();#endif /* end not protos */ specs_t GLOBALFAR *pspecs; /* Pointer to specifications bundle */ specs_t specs; /* copy specs onto stack */ ufix8 FONTFAR *font_org; /* Pointer to start of font data */ ufix8 FONTFAR *hdr2_org; /* Pointer to start of private header data *//* set_trns.c data definitions */ tcb_t tcb; /* Current transformation control block */ ufix8 Y_edge_org; /* Index to first Y controlled coordinate */ ufix8 Y_int_org; /* Index to first Y interpolation zone */ fix31 rnd_xmin; /* rounded out value of xmin for int-char spac. fix */#if REENTRANT_ALLOC plaid_t STACKFAR *plaid;#else /* if not reentrant */ fix15 orus[MAX_CTRL_ZONES]; /* Controlled coordinate table (orus) */#if INCL_RULES fix15 pix[MAX_CTRL_ZONES]; /* Controlled coordinate table (sub-pixels) */ fix15 mult[MAX_INT_ZONES]; /* Interpolation multiplier table */ fix31 offset[MAX_INT_ZONES]; /* Interpolation offset table */#endif /* endif incl_rules */#endif /* endif not reentrant */ fix15 no_X_orus; /* Number of X controlled coordinates */ fix15 no_Y_orus; /* Number of Y controlled coordinates */ ufix16 Y_constr_org; /* Origin of constraint table in font data */#if INCL_RULES constr_t constr; /* Constraint data state */ boolean c_act[MAX_CONSTR]; /* TRUE if constraint currently active */ fix15 c_pix[MAX_CONSTR]; /* Size of constrained zone if active */#endif #if INCL_ISW boolean import_setwidth_act; /* boolean to indicate imported setwidth */ boolean isw_modified_constants; ufix32 imported_width; /* value of imported setwidth */ fix15 isw_xmax; /* maximum oru value for constants*/#endif#if INCL_SQUEEZING || INCL_ISW fix15 setwidth_orus; /* setwidth value in orus */ /* bounding box in orus for squeezing */ fix15 bbox_xmin_orus; /* X minimum in orus */ fix15 bbox_xmax_orus; /* X maximum in orus */ fix15 bbox_ymin_orus; /* Y minimum in orus */ fix15 bbox_ymax_orus; /* Y maximum in orus */#endif#ifdef INCL_SQUEEZING boolean squeezing_compound; /* flag to indicate a compound character*/#endif#ifdef INCL_CLIPPING fix31 clip_xmax; fix31 clip_ymax; fix31 clip_xmin; fix31 clip_ymin;#endif } SPEEDO_GLOBALS;/*********************************************************************************** * * Speedo global data structure allocation * ***********************************************************************************/#ifdef SET_SPCS#define EXTERN #else#define EXTERN extern#endif#if STATIC_ALLOCEXTERN SPEEDO_GLOBALS GLOBALFAR sp_globals;#define sp_intercepts sp_globals#define sp_plaid sp_globals#else#if DYNAMIC_ALLOCEXTERN SPEEDO_GLOBALS GLOBALFAR *sp_global_ptr;#define sp_globals (*sp_global_ptr)#define sp_intercepts (*sp_global_ptr)#define sp_plaid (*sp_global_ptr)#else#if REENTRANT_ALLOC#define sp_globals (*sp_global_ptr)#define sp_intercepts (*(*sp_global_ptr).intercepts)#define sp_plaid (*(*sp_global_ptr).plaid)#endif#endif#endif#ifdef EXTERN#undef EXTERN#endif/***** PUBLIC FONT HEADER OFFSET CONSTANTS *****/#define FH_FMVER 0 /* U D4.0 CR LF NULL NULL 8 bytes */#define FH_FNTSZ 8 /* U Font size (bytes) 4 bytes */#define FH_FBFSZ 12 /* U Min font buffer size (bytes) 4 bytes */#define FH_CBFSZ 16 /* U Min char buffer size (bytes) 2 bytes */#define FH_HEDSZ 18 /* U Header size (bytes) 2 bytes */#define FH_FNTID 20 /* U Source Font ID 2 bytes */#define FH_SFVNR 22 /* U Source Font Version Number 2 bytes */#define FH_FNTNM 24 /* U Source Font Name 70 bytes */#define FH_MDATE 94 /* U Manufacturing Date 10 bytes */#define FH_LAYNM 104 /* U Layout Name 70 bytes */#define FH_CPYRT 174 /* U Copyright Notice 78 bytes */#define FH_NCHRL 252 /* U Number of Chars in Layout 2 bytes */#define FH_NCHRF 254 /* U Total Number of Chars in Font 2 bytes */#define FH_FCHRF 256 /* U Index of first char in Font 2 bytes */#define FH_NKTKS 258 /* U Number of kerning tracks in font 2 bytes */#define FH_NKPRS 260 /* U Number of kerning pairs in font 2 bytes */#define FH_FLAGS 262 /* U Font flags 1 byte: */ /* Bit 0: Extended font */ /* Bit 1: not used */ /* Bit 2: not used */ /* Bit 3: not used */ /* Bit 4: not used */ /* Bit 5: not used */ /* Bit 6: not used */ /* Bit 7: not used */#define FH_CLFGS 263 /* U Classification flags 1 byte: */ /* Bit 0: Italic */ /* Bit 1: Monospace */ /* Bit 2: Serif */ /* Bit 3: Display */ /* Bit 4: not used */ /* Bit 5: not used */ /* Bit 6: not used */ /* Bit 7: not used */#define FH_FAMCL 264 /* U Family Classification 1 byte: */ /* 0: Don't care */ /* 1: Serif */ /* 2: Sans serif */ /* 3: Monospace */ /* 4: Script or calligraphic */ /* 5: Decorative */ /* 6-255: not used */#define FH_FRMCL 265 /* U Font form Classification 1 byte: */ /* Bits 0-3 (width type): */ /* 0-3: not used */ /* 4: Condensed */ /* 5: not used */ /* 6: Semi-condensed */ /* 7: not used */ /* 8: Normal */ /* 9: not used */ /* 10: Semi-expanded */ /* 11: not used */ /* 12: Expanded */ /* 13-15: not used */ /* Bits 4-7 (Weight): */ /* 0: not used */ /* 1: Thin */ /* 2: Ultralight */ /* 3: Extralight */ /* 4: Light */ /* 5: Book */ /* 6: Normal */ /* 7: Medium */ /* 8: Semibold */ /* 9: Demibold */ /* 10: Bold */ /* 11: Extrabold */ /* 12: Ultrabold */ /* 13: Heavy */ /* 14: Black */ /* 15-16: not used */#define FH_SFNTN 266 /* U Short Font Name 32 bytes */#define FH_SFACN 298 /* U Short Face Name 16 bytes */#define FH_FNTFM 314 /* U Font form 14 bytes */#define FH_ITANG 328 /* U Italic angle 2 bytes (1/256th deg) */#define FH_ORUPM 330 /* U Number of ORUs per em 2 bytes */#define FH_WDWTH 332 /* U Width of Wordspace 2 bytes */#define FH_EMWTH 334 /* U Width of Emspace 2 bytes */#define FH_ENWTH 336 /* U Width of Enspace 2 bytes */#define FH_TNWTH 338 /* U Width of Thinspace 2 bytes */#define FH_FGWTH 340 /* U Width of Figspace 2 bytes */#define FH_FXMIN 342 /* U Font-wide min X value 2 bytes */#define FH_FYMIN 344 /* U Font-wide min Y value 2 bytes */#define FH_FXMAX 346 /* U Font-wide max X value 2 bytes */#define FH_FYMAX 348 /* U Font-wide max Y value 2 bytes */#define FH_ULPOS 350 /* U Underline position 2 bytes */#define FH_ULTHK 352 /* U Underline thickness 2 bytes */#define FH_SMCTR 354 /* U Small caps transformation 6 bytes */#define FH_DPSTR 360 /* U Display sups transformation 6 bytes */#define FH_FNSTR 366 /* U Footnote sups transformation 6 bytes */#define FH_ALSTR 372 /* U Alpha sups transformation 6 bytes */#define FH_CMITR 378 /* U Chemical infs transformation 6 bytes */#define FH_SNMTR 384 /* U Small nums transformation 6 bytes */#define FH_SDNTR 390 /* U Small denoms transformation 6 bytes */#define FH_MNMTR 396 /* U Medium nums transformation 6 bytes */#define FH_MDNTR 402 /* U Medium denoms transformation 6 bytes */#define FH_LNMTR 408 /* U Large nums transformation 6 bytes */#define FH_LDNTR 414 /* U Large denoms transformation 6 bytes */ /* Transformation data format: */ /* Y position 2 bytes */ /* X scale 2 bytes (1/4096ths) */ /* Y scale 2 bytes (1/4096ths) */#define SIZE_FW FH_LDNTR + 6 /* size of nominal font header */#define EXP_FH_METRES SIZE_FW /* offset to expansion field metric resolution (optional) *//***** MODE FLAGS CONSTANTS *****/#define CURVES_OUT 0X0008 /* Output module accepts curves */#define BOGUS_MODE 0X0010 /* Linear scaling mode */#define CONSTR_OFF 0X0020 /* Inhibit constraint table */#define IMPORT_WIDTHS 0X0040 /* Imported width mode */#define SQUEEZE_LEFT 0X0100 /* Squeeze left mode */#define SQUEEZE_RIGHT 0X0200 /* Squeeze right mode */#define SQUEEZE_TOP 0X0400 /* Squeeze top mode */#define SQUEEZE_BOTTOM 0X0800 /* Squeeze bottom mode */#define CLIP_LEFT 0X1000 /* Clip left mode */#define CLIP_RIGHT 0X2000 /* Clip right mode */#define CLIP_TOP 0X4000 /* Clip top mode */#define CLIP_BOTTOM 0X8000 /* Clip bottom mode *//*********************************************************************************** * * Speedo function declarations - use prototypes if available * ***********************************************************************************/#if PROTOS_AVAIL/* do_char.c functions */ufix16 sp_get_char_id(PROTO_DECL2 ufix16 char_index);boolean sp_make_char(PROTO_DECL2 ufix16 char_index);#if INCL_ISW fix31 sp_compute_isw_scale(PROTO_DECL2);static boolean sp_do_make_char(PROTO_DECL2 ufix16 char_index);boolean sp_make_char_isw(PROTO_DECL2 ufix16 char_index, ufix32 imported_width);static boolean sp_reset_xmax(PROTO_DECL2 fix31 xmax);#endif#if INCL_ISW || INCL_SQUEEZINGstatic void sp_preview_bounding_box(PROTO_DECL2 ufix8 FONTFAR *pointer,ufix8 format);#endif#if INCL_METRICS /* Metrics functions supported? */fix31 sp_get_char_width(PROTO_DECL2 ufix16 char_index);fix15 sp_get_track_kern(PROTO_DECL2 fix15 track,fix15 point_size);fix31 sp_get_pair_kern(PROTO_DECL2 ufix16 char_index1,ufix16 char_index2);boolean sp_get_char_bbox(PROTO_DECL2 ufix16 char_index, bbox_t *bbox);#endif/* do_trns.c functions */ufix8 FONTFAR *sp_read_bbox(PROTO_DECL2 ufix8 FONTFAR *pointer,point_t STACKFAR *pPmin,point_t STACKFAR *pPmax,boolean set_flag);void sp_proc_outl_data(PROTO_DECL2 ufix8 FONTFAR *pointer);/* out_blk.c functions */#if INCL_BLACKboolean sp_init_black(PROTO_DECL2 specs_t GLOBALFAR *specsarg);boolean sp_begin_char_black(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax);void sp_begin_contour_black(PROTO_DECL2 point_t P1,boolean outside);void sp_line_black(PROTO_DECL2 point_t P1);boolean sp_end_char_black(PROTO_DECL1);#endif/* out_scrn.c functions */#if INCL_SCREENboolean sp_init_screen(PROTO_DECL2 specs_t GLOBALFAR *specsarg);boolean sp_begin_char_screen(PROTO_DECL2 point_t Psw,point_t Pmin,point_t Pmax);void sp_begin_contour_screen(PROTO_DECL2 point_t P1,boolean outside);void sp_curve_screen(PROTO_DECL2 point_t P1,point_t P2,point_t P3, fix15 depth);void sp_scan_curve_screen(PROTO_DECL2 fix31 X0,fix31 Y0,fix31 X1,fix31 Y1,fix31 X2,fix31 Y2,fix31 X3,fix31 Y3);void sp_vert_line_screen(PROTO_DECL2 fix31 x, fix15 y1, fix15 y2);void sp_line_screen(PROTO_DECL2 point_t P1);void sp_end_contour_screen(PROTO_DECL1);boolean sp_end_char_screen(PROTO_DECL1);#endif/* out_outl.c functions */#if INCL_OUTLINE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -