From: richard AT NOSPAMstardate DOT bc DOT ca (Richard Sanders) Newsgroups: comp.os.msdos.djgpp Subject: Re: Need help with GRX2.2 Fonts Date: Wed, 08 Oct 1997 01:59:05 GMT Organization: Rapidnet Technologies Internet Lines: 37 Message-ID: <343ae834.4670108@207.102.150.4> References: <343729A1 DOT 4CAE AT utoronto DOT ca> NNTP-Posting-Host: wlp19.rapidnet.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Sun, 5 Oct 1997 05:46:09 GMT, Dan wrote: >Hello, > >I haven't been able to figure out how to use GrDrawChar(chr, x, y, >GrTextOption *opt). GrTextXY is fairly straight forward, but I'm not >quite sure how to initialize the GrTextOption *opt. Could someone >help me out? > >Thank you, > Dan GrFont *font_helv22b, *font_helv15, *font_helv15b; GrTextOption helv22b, helv15, helv15b; GrSetFontPath( PATH ); /* replace PATH with the path to */ /* the font dir */ font_helv22b = GrLoadFont( "helv22b.fnt" ); font_helv15 = GrLoadFont( "helv15.fnt" ); font_helv15b = GrLoadFont( "helv15b.fnt" ); // initilize the font structures helv15.txo_bgcolor.v = helv22b.txo_bgcolor.v = GrNOCOLOR; helv15b.txo_bgcolor.v = GRAY; helv22b.txo_direct = GR_TEXT_RIGHT; helv22b.txo_xalign = GR_ALIGN_CENTER; helv22b.txo_yalign = GR_ALIGN_CENTER; helv22b.txo_font = font_helv22b; helv15b.txo_font = font_helv15b; helv15.txo_font = font_helv15; /* set the character bit width */ helv15b.txo_chrtype = helv22b.txo_chrtype = helv15.txo_chrtype = GR_BYTE_TEXT;