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

📄 fpgm.c

📁 ttfdump源代码
💻 C
字号:
/* fpgm.c -- Font Program * Copyright (C) 1996 Li-Da Lho, All right reserved  */#include <stdio.h>#include <stdlib.h>#include "config.h"#include "ttf.h"#include "ttfutil.h"#ifdef MEMCHECK#include <dmalloc.h>#endif/* 	$Id: fpgm.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $	 */#ifndef lintstatic char vcid[] = "$Id: fpgm.c,v 1.1.1.1 1998/06/05 07:47:52 robert Exp $";#endif /* lint */static void ttfLoadFPGM(FILE *fp,BYTE *fpgm,USHORT lenght,ULONG offset);void ttfInitFPGM(TTFontPtr font){    ULONG tag = 'f' | 'p' << 8 | 'g' << 16 | 'm' << 24;    TableDirPtr ptd;    if ((ptd = ttfLookUpTableDir(tag,font)) != NULL)	{	    font->fpgmLength = ptd->length;	    font->fpgm = (BYTE *) calloc(font->fpgmLength, sizeof(BYTE));	    if (font->fpgm != NULL)		ttfLoadFPGM(font->fp,font->fpgm,font->fpgmLength,ptd->offset);	}}static void ttfLoadFPGM(FILE *fp,BYTE *fpgm,USHORT length,ULONG offset){    if (fseek(fp,offset,SEEK_SET) !=0)	ttfError("Fseek Failed in ttfLoadCVT \n");    if (fread(fpgm, sizeof(BYTE), length, fp) != length)	ttfError("Error when getting CVT\n");}void ttfPrintFPGM(FILE *fp, BYTE *fpgm, USHORT length){    ttfPrintInstructions(fp, fpgm);}void ttfFreeFPGM(BYTE *fpgm){    if (fpgm != NULL)	free(fpgm);}

⌨️ 快捷键说明

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