Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
how can i know
1)how many bits are corresponding to length of a non-monospaced
characters(let's say "i" and "m")
2)the position of first bit of every line of a character
in a nonmonospaced characters file.
in a monospaced characters file it's easy to calculate because every
character line has 1 byte length(the files are matrixes 256*nr_lines/char
bytes bitmapping);
i need this for making a hardware which inserts characters generated from
a mono- or nonmono- spaced characters file in tv video signal.So, if the
length of every char is different how can i do this
in DOS C environnment, because the data in PC,external hardware parallel static RAM, C
variables are represented on multiples of a byte.I must represent
them in a video line as a continuous data string,the characters must be
concatenated no matter of their bit length(without spaces at tick
characters- display way is something similar with normal PC monitors)

I don't think proportional spacing fonts are allowed in DOS. The DOS display is a character device, not a raster device.
Best

no matter what kind of os is, thee idea is to get the characters building line pixels \
and assemble them in a continuaous string.

The width of a character is dependent upon the font. Except monospaced. However the widths of i's and w's in different fonts are different. We are also making an assumption of the same font size.
To display a font on a video display you have to scale your font to the horizontal and video resolution needed. Each character will have its matrix map.
Consider the video display as a large matrix. You figure out the position of each character and overlay the character's matrix.
It would be easier if you have a frame buffer otherwise you would have to output a scan line at a time. Also compensate for interlace.
You might want to consider looking at the methods used by commercial and home video titlers. I remember reading about a home titler that had a large font selection and an interface to a PC. Also most of these devices support color and special effects.
Although you base hardware is DOS, you can have output bytes to your device. You will need hardware/software to unpack the bytes to display memory.
If this is a one of project you might try using a video card with composite video output. This would save building hardware.

Sorry, i thought DOS had a rom based character generator .. that is all screens just 25x80 push a byte into the buffer. But you are correct if you bypass the character generator.
Ok you don't know how many characters on a scan line. Seems like ya gotta buffer each line ... pack in as many as possible then microjustify back out to full line. Gets hairy !
And you have unknown font ? If you just had a "set" of fonts, then they would be known. Like well that's an "i" font#7 so giving it space on both sides you know how many pixels width it is and add it to buffer. When you can't add another character to the buffer you justify the line.
Now if you don't know the font, well it's gonna take some kinda measurement of the font set ... edge detection ? Assuming it's a bitmapped font then each character march in from each side until a pixel is lit, that's the limit/width from that side.
So it's kinda like NTSC where you work with one line at a time (between tics) and it is a stream, er parallel stream w/heighth.
Best

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |