⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cafont_load.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
📖 第 1 页 / 共 3 页
字号:
 *		xl_st.curchar.avp to sgr() case 4 (for UL/PLU/PLD fix) *	nv	 28-AUG-1986 15:33:53 Made the evaluation of font_table [i]  *		.spacing conditionally dependent upon dll_spacing in  *		'update_font_table_and_sgr_flags'. *		Changed the definition of dll_spacing from UBYTE to UWORD. *		Added comments to highlight the fact that font_table [i]  *		.spacing is used as a boolean as well as a value. *	gh	 1-SEP-1986 09:57:49 Changed declaration of font_table[]. *		point_size to UWORD from WORD. *	nv	 2-SEP-1986 17:16:11 Within setup_metric_tables changed all *		'MAX_CSET_SIZE' references to 'MAX_CSET_SIZE - 1'. *		Adjusted the declared size of dll_width_tbl  *		made font_table_struct a proper 'typedef'. *		Added the following structure items to FONT_TABLE_STRUCT *			LONG	space_width, *				ul_thickness, *				ul_offset, *				strikethru_thickness, *				strikethru_offset, *				virtual_memory_needs; *			BYTE	*bitmaps_ptr; *		Provided for the initialization for all of the new structure *		items. *		Implemented the evaluations for all but the last two of the *		new structure items. *		Removed the LOCAL restriction on font_table. *	nv	 3-SEP-1986 10:17:27 Added font_table entry as third parameter  *		in all calls to 'dispose_font'. *		Made 'total_portrait_bytes' and 'number_of_odd_words_in_bitmaps' *		accessable an external declaration. *		Implemented the evaluation for *		font_table [i] .virtual_memory_needs based on *		'total_portrait_bytes' and 'number_of_odd_words_in_bitmaps'. *		Made 'font_bitmap' and 'dll_char' accessable external *		declaration. *		Implemented the evaluations for all but the last of the *		'font_bitmap' structure items. *		Included within 'declff' memory allocation for the bitmaps of *		each downloaded bitmap. *		Made a new procedure, called 'clean_up_host_memory', which  *		frees all allocated memory. *		Implemented the evaluation for the last of the 'font_bitmap' *		structure items, i.e., 'bitmap_ptr'. *	nv	 4-SEP-1986 08:50:10 streamlined main for-loop, (i.e., with  *		respect to 'i') within 'setup_metric_tables'. *		Replaced 'declff' and 'tabulated_deleted_font_file' with  *		redesigned versions to implement caching of fonts. *		Created 'vm_wasted' and 'vm_being_used' as global variables *		to support caching of fonts. *		Initialize 'vm_wasted' and 'vm_being_used' in 'font_init'. *		Defined the following literals to support caching of fonts: *			FONT_VM_OVERHEAD *			TOTAL_VIRTUAL_MEMORY *			VIRTUAL_MEMORY_SAFETY_MARGIN *		Moved define of 'FONT_TABLE_STRUCTURE' to xlate.h. *		Made 'ps_font_table' global. *		Removed definition of FIRST_DOWNLOADED_FONT and *		PS_FONT_TABLE_SIZE; they are now defined in 'xlate.h'. *	nv	 5-SEP-1986 12:06:19 Removed the following literal definitions *		(they are now defined in 'xlate.h'.): *			NUMBER_OF_8_BIT_CHARACTERS, *			FONT_FILE_ID_SIZE, *			FIRST_DOUBLE_PS_DOWNLOADED_FONT' *			NUMBER_OF_PS_FIXED_FONT_DICTNRS, *			UNUSED. *		Added in 'update_font_table_and_sgr_flags' software for  *		storing additional font metrics in the font_table's new *		structure items: *			above_baseline, *			total_height, *			superscript_height, *			subscript_height, *			average_width, *			min_table, *			max_table. *		Added provisions in 'init_font_table' for initializing the  *		the same above new structure items in the font_table; and, *		based upon the new initializations in 'init_font_table', *		redesigned the following procedures: *			init_min_table, *			init_max_table, *			init_total_height_table, *			init_above_baseline_table, *			init_superscript_height_table, *			init_subscript_height_table. *		Added and changed software within 'setup_metric_tables' to  *		average the font metrics of a newly paired font with its mate's *		the font metrics. *		Replaced 'ERROR_MACRO' with 'ABORT_MACRO' and 'WARNING_MACRO' *		as appropriate; removed 'ERROR_MACRO' definition. *		Re-defined the following literals: *			TOTAL_VIRTUAL_MEMORY         100000 *			VIRTUAL_MEMORY_SAFETY_MARGIN 50000 *	nv	 8-SEP-1986 12:09:42 All wipe_all functionality when all  *		downloaded font file are deleted. *		Re-defined the following literals: *			TOTAL_VIRTUAL_MEMORY         1048575 - 160000 *			VIRTUAL_MEMORY_SAFETY_MARGIN 100000 *		 *	nv	 16-SEP-1986 15:53:40 Make provision within font_init for the  *		distinction between power_up and ordinary ris *	nv	 25-SEP-1986 18:04:31 Changed the determination of font *		metrics which are common for paired font files, but may be *		different between those files (due to shoddy work by font *		foundries), so that the MAXIMUM of a pair of values are used *		rather than the average.  *	nv	 7-OCT-1986 16:57:23 In 'new_ps_font_number', changed abort  *		code from 21 to 29. *		In 'setup_metric_tables', added 'WARNING_MACRO' for seven *		possible incompatabilities of metrics for paired fonts.  *	nv	 10-OCT-1986 10:22:15 Moved call to 'compute_font' from *		'decdtff' to 'exit_current_mode' in xlc_pars.c. *	nv	 15-OCT-1986 16:43:19 Re-enabled, by conditionally excluding *		compilation unless FONT_FILE_MODE_IS_MEANINGFUL, 'feature' in *		'sgr' and 'compute_font_for_g_set' to allow algorithmic *		altering of attributes when fonts are selected by font id. (Cf *		9-JUL and 27-AUG.)  *		Excluded, by conditional compilation with respect to *		FONT_FILE_MODE_IS_MEANINGFUL, most of the code in 'compute_vai'. *	nv	 17-OCT-1986 12:00:19 Redesigned the initialization of *		sgr_table so as to support the ability of null decatff *		commands to reinitialize the sgr_table.  *	nv	 21-OCT-1986 12:57:28 Added external reference to *		'below_baseline_table' and calculated its value in  *		'setup_metrics_tables'. *	nv	 21-OCT-1986 17:31:34 Included initialization of  *		'below_baseline_table'. *	nv	 22-OCT-1986 10:17:39 Changed the sign of 'above_baseline_table' *		in the calculation of 'below_baseline_table'. *	nv	 22-OCT-1986 13:09:49 Modified 'compute_vai' to use the height *		of the font used by GL. *	nv	 31-OCT-1986 14:12:56 Changed the character_proportion is  *		initialized for built-in fonts so that Courir 10.3cpi and *		Elite can be initialized 97% and 83% respectively.  *	nv	 3-NOV-1986 16:04:05 Remove the literal 'EXACT_WEIGHT'. *		Define the following literals: *			REGULAR_WEIGHT_CODE, *			SEMI_BOLD_WEIGHT_CODE, *			BOLD_WEIGHT_CODE, and  *			MAX_WEIGHT_VALUE. *		Re-defined EXACT_UL_AND_STRIKETHRU  as 0x1. *		Change the weight threshold for considering a font bold from  *		'25' to '22' in 'update_font_table_and_sgr_flags'. *		In 'compute_font_for_g_set', completely re-designed how fonts *		are scored according to their weight and changed the selection *		process so that no font is 'killed' (i.e., disqualified) on *		account of its weight.  *		Improved and added comments. *	nv	 4-NOV-1986 19:00:16 fixed bug: in order to change "the *		selection process so that no font is 'killed' (i.e., *		disqualified) on account of its weight", '& NO_BOLD' had to be  *		changed to '| BOLD'. *	nv	 5-NOV-1986 11:00:32 Worked on refining the software which *		effects the reconciling of mismatched font metrics for paired *		fonts. *		Removed 'wipe_all & restore_all' code at  the end of 'declff'. *		(This tended to expanded grossly PS code and translator *		processing for each downloaded font.) *		Created a 'mismatched_paired_font_metrics' flag; initialized  *		it to FALSE in 'create_new_paired_font' and set it in  *		'setup_metric_tables' if a mismatch was found. *		Changed 'create_new_paired_font', if a mis-match occured, to *		overwrite the old version of the new downloaded font's mate *		(so that revised font metrics are used), appropriately increment *		'vm_wasted' and, only if necessary, do a 'wipe_all & *		restore_all'. *	nv	 24-NOV-1986 10:07:16 Replaced all references to *		'TOTAL_VIRTUAL_MEMORY' wiht 'xl_st .vm_size'. *		Deleted the definition for TOTAL_VIRTUAL_MEMORY. *      kws	 17-MAR-1987 16:40:58 Add support for ISO LATIN1 as *		an NRCS. *      kws	 18-MAR-1987 22:53:05 Allow ISO LATIN1 to be selectable *              as a user preference character set. *      kws      18-MAR-1987 22:53:51 Fix optimization problems in scs(). *      kws      24-MAR-1987 10:58:25 QAR 1033. Select NRCS table 1 for *              DEC Supplemental downloaded fonts. * *	araj	 4-APR-1987 00:14:19 Made vm_wasted, vm_being used  *		Globals. Should be moved to XLATE.H, were Globals belong *      kws	 19-JUN-1987 13:16:35 Fix font attributes being ignored *              when fonts are both BOLD and italicized. *//* Translator edit history for secondary (store sixel) routines * * file:	xlc_dcs.c - DCS processing routines for translator * created:	laf  17-APR-1986 15:05:39  * edit:	laf  17-APR-1986 16:04:04  Added static variables *					   for DCS processing *		laf	 22-APR-1986 11:19:20 Changing enter_dcs_store(), *			 complete_store_char(), complete_store_sixel() *		laf	 24-APR-1986 10:03:36 Added check for too big  *			 repeat count to dcs_store_repeat; added call to *			 compute_font to complete_store_sixel (and  *			 COMMENTED IT OUT, all per Nick's request);  *			 changed complete_store_char to pass FALSE/TRUE *			 depending on value of ps1. *		gh	 30-APR-1986 10:25:33 Changing some font routine calls *		laf	 5-MAY-1986 14:32:24 Add error checking of params *			 to decatff & decdtff; add 0 at end of stored DCS *			 string for a decatff so that don't have to pass  *			 string len to decatff as a parameter (at Nick's  *			 request); also defined FIRST_SGR_TABLE_ENTRY and *			 ERROR_CODE *		gh	 8-MAY-1986 12:18:56 Deleting delete_font_files, *			 declff,decatff,decdtff stubs. *		laf	 13-MAY-1986 16:50:44 Was passing dcs_intro.ps2 *			 to decatff instead of the "adjusted" SGR table *			 index "temp", so I fixed it. *		laf	 28-MAY-1986 21:33:36  Changed dumpdcs () so it *			 writes output to a file called "dump1.dcs" *			 instead of to the screen. *		nv	 21-JUL-1986 16:06:01 Changed the defined value of *			DECLFF_DEL_ALL_DWNLD_FONTS from '0' to '3'. * *		araj	 2-AUG-1986 02:59:57  *			modified DUMPDCS, as the pointer had a tendancy to *			go overboard, if an odd number of bytes were *			received. * *		araj	 2-AUG-1986 03:12:07  *			CMD_STR_LEN must be 64K, not 32K *			so should k for instance *		nv	 16-OCT-1986 16:40:46 Moved "pstate = S_STORECHAR;" *			statement from the end of 'case ~' and 'case }' in *			'pr_dcsseq' to the end of 'case ~' and 'case }' in *			'enter_dcs_store'.  *			Moved "pstate = S_STORESIXEL;" statement from the end *			of 'case y' in 'pr_dcsseq' to the end of 'case y' in *			'enter_dcs_store'.  *		nv	 17-OCT-1986 11:40:28 In 'complete_store_char', made *			provisions for a null decatff commands to reinitialize *			a designated sgr table entry.  *              kws      18-MAR-1987 22:49:43 Add DCS sequence to select  *                      user preference character set. *//*  begin include_file    */#define cafont_load	(1)#include    "portab.h"	    /* general portability constants */#include    "cpsys.hc"	    /* system wide constants, typedefs, etc. */#include    "cpast.hc"	    /* ANSI State & Token Table Declarations	*/#include    "caglobal.hc"   /* globals defs for the CARs		*/#include    "camac.lib_hc"  /* non-dump oprintf                         */#ifdef  DUMP#include    "dumpu.hc"	    /* Dump Utility                             */#include    "xlc_iface.hc"  /* defines for oprintf			*/#endif/*  end   include_file    *//***************************************************************************    Request Font Status *************************************************************************/VOID dec_rfs(){#ifdef DUMP    {    oprintf("DECRFS \n");    pprint();    }#endif}/***************************************************************************    Reserve Memory for Font *************************************************************************/VOID dec_rfnm(){    UBYTE mem_type;    UWORD mem_value;#ifdef DUMP    {    oprintf("DECrfnm \n");    pprint();    }#endif    mem_type = MEM_FONT;	/* set type of memory to font */    mem_value = (UWORD)cp_pbuf[0];/* get parameter from buf for size of mem */    /* call the composer/ code_generator to reserve memory */    process_reserve_mem(mem_type, mem_value);}/***************************************************************************    Reserve Memory for Bitmap *************************************************************************/VOID dec_rbmm()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -