Here’show to assignID numbersto an internalor cartridgefont. You first selectthe font,thensendtheFontIDcommandto giveit an IDnumber,and finallycopythefontintomemorywithFontControlfunction6. If you want that copy to stay in RAM when you reset the printer, you concludeby sendingFont Controlfunction5.

Example: Controlling fonts

Let’ssee how thoselast few commandswork, translatedinto BASIC.

Pretendyouwanttomakeashorttestwithyourcurnmtfont(itdoesn’tmatter what it is): you wantto print what’sin ASCIItable positions128through 130.There’snothingthere in yournormalRoman-8symbolset, but some other sets keep controlcodesor internationalcharactersthere.

Assumingyou like what you see printedfrom those ASCII positions,you then want to make that currentfont permanent.Finally,you also want to dump all the temporaryfontsfromprintermemoryto make roomfor some graphicsyou’llbe printing.

Let’s start with a reset and an underlinedheadingfor yourtest print:

100LPRINTCHR$(27) ; “E”;

110LPRINTCHR$( 27) ; “&dOD”;

120LPRINT “Underlined heading for test print of ASCII 128 - 130” ;

130LPRINTCHR$( 27) ; “&d@”

140LPRINTCHR$(27) ; “&p3X”;

150LPRINTCHR$(128) ; CHR$(129) ; CHR$(130) ;

160LPRINTCHR$( 12) ;

170LPRINT CHR$( 27) ; “*c5f IF” ;

Line 100isjust the<ESC>E resetcommand.Lines 110and 130turnon and off the underlinefeature.

Line 140 turns on transparentprinting, which forces printing even for normallyunprintablecontrolcodes.Thethreebytesyouwantto printarein line 150.To see what’sthere, you send a form feed commandin line 160.

Andfinally,line 170usesthefontcontrolcommandto makethecurrentfont permanentand then deleteall temporaryfonts.

83

Page 91
Image 91
Star Micronics 8 Series manual Example Controlling fonts