🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1886

Re: Lining up rows and columns of characters

#1886
From: Curt Johnson
Date: Fri, 29 Mar 1991 01:06
26 lines
1928 bytes
In article <91084.073252LIBCRN@BYUVM.BITNET> LIBCRN@BYUVM.BITNET writes:
| In article <27561@uflorida.cis.ufl.EDU> jdb@reef.cis.ufl.edu (Brian K. W. Hook)
| writes:
| >| Now, the problem is that when I do a TextOut or a DrawText, the letters do
| >| not align themselves correctly vertically because of the fonts.  This
| >| becoming a very important issue...is there a way to make the characters
| >| line up (assign 8x8 bit maps to everything?)....
| 
| >You want to use a font with fixed spacing.
| 
|    There is another solution.  Instead of using a fixed font, split your
| output strings into a number of fields (each collumn should be a seperate
| field).  Then when you draw the string on the screen, instead of calling
| TextOut() once for the entire string, you call it a number of times (as
| many times as you have collumns).  Each time that you call TextOut(), you
| supply it with the part of the output string which corresponds with the
| collumn you are drawing at that time.  It takes a little more work, but if
| you do it this way, you can still use proportional fonts instead of those
| ugly fixed fonts.

If I remember correctly, the specific problem Brian was solve was printing
a two-dimensional map of something using characters (i.e. each column is
one character wide).  For a case like this I think the visual appearance of
the fixed fonts is fine.

Curt Johnson == curt@cctb.wa.com
Technical Details
Message-ID: <zh1fg8yah@cctb.wa.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!milton!sumax!ole!quick!cctb!curt
References: <27561@uflorida.cis.ufl.EDU> <yva6g814c@cctb.wa.com> <91084.073252LIBCRN@BYUVM.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!milton!sumax!ole!quick!cctb!curt
From: curt@cctb.wa.com (Curt Johnson)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Lining up rows and columns of characters
Message-ID: <zh1fg8yah@cctb.wa.com>
Date: 29 Mar 91 01:06:10 GMT
References: <27561@uflorida.cis.ufl.EDU> <yva6g814c@cctb.wa.com> <91084.073252LIBCRN@BYUVM.BITNET>
Organization: Chemical Computer Thinking Battery, Redmond, WA
Lines: 26