waynet@tekred.CNA.TEK.COM (Wayne Turner) (07/27/90)
I am working with a user-interface generator (Graphics-Menu BGI version) that requires either BGI's standard 8x8 bit-mapped font or a fixed-width stroked font for correct cursor positioning during text-editing. I suspect that other GUI's may have this 'feature' :-(. The problem is that in VGA 640 X 480 resolution the bit-mapped characters are just too small and none of the standard BGI stroked fonts are fixed-width. I downloaded Borland's Stroked Font Editor and additional stroked fonts from the archives. The question is how to specify an alternate font (e.g., using the settextstyle routine). In an attempt to use the EURO.CHR font I renamed EURO.CHR to TRIP.CHR and specified TRIPLEX_FONT to settextstyle. This caused the standard bit-mapped font to be used. I suspect that this is due to TRIP.CHR now containing a signature that doesn't match the basename of the file. In any event, if the extended fonts are all proportionally spaced they won't be of much use to me. The best solution, if workable, would be to use an alternate BIT-MAPPED font. Anyone know of a way to do this? Thanks, Wayne Turner
ergo@netcom.UUCP (Isaac Rabinovitch) (07/27/90)
In <6029@tekred.CNA.TEK.COM> waynet@tekred.CNA.TEK.COM (Wayne Turner) writes: > In an attempt to use the >EURO.CHR font I renamed EURO.CHR to TRIP.CHR and specified TRIPLEX_FONT >to settextstyle. This caused the standard bit-mapped font to be used. >I suspect that this is due to TRIP.CHR now containing a signature that >doesn't match the basename of the file. In any event, if the extended >fonts are all proportionally spaced they won't be of much use to me. That's going at it all wrong. You want to register a new font, not play tricks with one of the old ones. You probably got stuck the same place I did. The *Turbo C Reference* entry for settextstyle() goes on and on about using it a alone and in conjunction with registerbgifont(). But apparently this only works with fonts that're hard-wired into the BGI setup. I finally called Borland Tech Support and they told me to use installuserfont(). (The manual could've had a simple cross-reference to it, but that'd be too easy!) I looked it up, realized at first glance that it would work, and hung up. This function takes a font file name (*any* font file name) and returns a font number you can pass to setttextstyle(). Then I realized that this'd only work for external font files, and I still didn't know how to make "user" fonts "linked-in". Anybody want to tell me and save me another phone call? -- ergo@netcom.uucp Isaac Rabinovitch atina!pyramid!apple!netcom!ergo Silicon Valley, CA uunet!mimsy!ames!claris!netcom!ergo "I hate quotations. Tell me what you know!" -- Ralph Waldo Emerson