**fScan Reference Manual, Chapter 3 (KeyCmds:WinKeys): text ** ===== Text -- Control display text features ===== **usage:**\\ * mode,textflag t -- specify text display options * 'fontname',90 t -- load a software font by name * 'string',91,x,y,flag,color,font t -- print text on image * 'string',92,x,y,flag,color,font t -- embed text in image * 'fontname',98,flag,size,x0,y0,ya,yd,dy,gap,w0,ch0,nch t -- create a software font from an image ==== Specifying text display options ==== * mode,textflag t * MODE - * 0 - turn TEXTFLAG bits off * 1 - turn TEXTFLAG bits on * 2 - toggle TEXTFLAG bits * 3 - set all bits to TEXTFLAG * 9 - report which bits are currently set * TEXTFLAG * 1 - IMAGENUM * 2 - THRESH * 4 - TITLE * 8 - TIME * 16 - SCAN * 32 - SUBJECT * 64 - EXAM * 128 - WINLOC * 256 - IOLOC * 512 - ROOMLOC * 1024 - WSLOC * 2048 - TALAIRACH * 4096 - NAME * 8192 - ANNOTATION * 16384 - NOTE * 32768 - OTHERWSLOC ==== Putting embedded text into images ==== * 'fontname',90 t - load/select font * 90,fontnum t - select font by number * 'string',91,x,y,flag,color,font t - print text on image * 'string',92,x,y,flag,color,font t - embed text in image * 'fontname',99,flag t * load the named font or select the named font if already loaded * 99,fontnum,flag t * select a loaded font by font number (assigned when the font was loaded) ==== Creating a software font from an image of text symbols ==== This is a rather peculiar command. If you have an image with examples of printable font characters (ASCII codes 33-126) in ASCII order, this command will generate a font table by extracting the image for each individual character symbol. You need to specify some image sampling parameters so it knows where to look in the image and what characters to expect. The command assumes that your image has black text on a white background. * 'fontname',98,flag,size,x0,y0,ya,yd,dy,gap,w0,ch0,nch t * FLAG - * X0 - x start pos * Y0 - Y baseline (nondescending chars sit here) * YA - Maximum ascent * YD - Maximum descent * GAP - number of pixels between chars * W0 - width of blank space (char 32) * CH0 - char code for 1st char in image * NCH - number of chars in image **See Also:**\\ [[jvs:fscan|fScan Home]], [[jvs:fscan:manual|fScan Manual]], [[jvs:fscan:manual:chapter3|KeyCmds]], [[jvs:fscan:manual:chapter3:winkeys|WinKeys]], [[jvs:fscan:manual:help|Manual Help]]