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

📄 ftview_m.c

📁 freetype库的应用demo,里面包含freetype的很多实例
💻 C
字号:
/* minimal Mac wrapper for the ftview.c program */int original_main( int  argc, char**  argv );/* We rename the original main() program to original_main,   so we can provide a wrapper around it */#define main original_main#include "ftview.c"#undef main#define PPEM "24" /* hard-code the ppem size */#include <SIOUX.h>#include "getargv.h"#ifndef USING_CARBON#include <Windows.h>#include <Dialogs.h>#include <Fonts.h>#include <TextEdit.h>#else#include <Carbon.h>#endifstatic voidinit_toolbox(){#ifndef USING_CARBON	InitGraf(&qd.thePort);	InitFonts();	InitWindows();	TEInit();	InitDialogs((long)0);	InitMenus();	InitCursor();#endif	SIOUXSettings.asktosaveonclose = 0;}int main(){	int  argc, i;	char** argv;		init_toolbox();		/* put paths of all files dropped onto the app into argv */	argc = FTMac_GetArgv(&argv);	if (argc < 2)	{		printf("Please drop one or more font files onto the app (but quit first!)\n");		exit(1);	}	/* move argv[1:] to argv[2:] and fill in the ppem arg */	for (i = argc; i > 1; i--)	{		argv[i] = argv[i-1];	}	argc++;	argv[1] = PPEM;	/* call the original main() program */	original_main(argc, argv);}

⌨️ 快捷键说明

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