什么是installuserfont

核心提示installuserfont,为函数名,可以安装未嵌入BGI系统的字体文件。外文名installuserfont功 能安装未嵌入BGI系统的字体文件用 法nt far installuserfontinstalluserfont函数名in

最佳答案:

installuserfont,为函数名,可以安装未嵌入BGI系统的字体文件。

详情介绍

installuserfont,为函数名,可以安装未嵌入BGI系统的字体文件。

外文名
installuserfont
功 能
安装未嵌入BGI系统的字体文件
用 法
nt far installuserfont

installuserfont函数名

installuserfont

installuserfont简介

功 能: 安装未嵌入BGI系统的字体文件(CHR)

用 法: int far installuserfont(char far *name);

程序例:

#include <graphics.h>

#include <stdlib.h>

#include <stdio.h>

#include <conio.h>

void checkerrors(void);

int main(void)

{

int gdriver = DETECT, gmode;

int userfont;

int midx, midy;

initgraph(&gdriver, &gmode, "");

midx = getmaxx() / 2;

midy = getmaxy() / 2;

checkerrors();

userfont = installuserfont("USER.CHR");

checkerrors();

settextstyle(userfont, HORIZ_DIR, 4);

outtextxy(midx, midy, "Testing!");

getch();

closegraph();

return 0;

}

void checkerrors(void)

{

int errorcode;

errorcode = graphresult();

if (errorcode != grOk)

{

printf("Graphics error: %sn", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1);

}

}

 
友情链接
鄂ICP备19019357号-22