Computing.Net > Forums > Disk Operating System > cpi file bits continuous string

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

cpi file bits continuous string

Reply to Message Icon

Name: deian1
Date: October 12, 2004 at 14:29:56 Pacific
OS: dos
CPU/Ram: ----
Comment:

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)



Sponsored Link
Ads by Google

Response Number 1
Name: Rick McNabb
Date: October 12, 2004 at 14:33:50 Pacific
Reply:

I believe every character should be 1 byte in length (8 bits).


0

Response Number 2
Name: jubalsams
Date: October 13, 2004 at 07:35:48 Pacific
Reply:

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

Best



0

Response Number 3
Name: deian1
Date: October 13, 2004 at 08:09:51 Pacific
Reply:

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


0

Response Number 4
Name: rogerashley
Date: October 13, 2004 at 08:24:33 Pacific
Reply:

Maybe post in the programming forum and let them know wether this is MSDOS or NT Command Promt.


0

Response Number 5
Name: wizard-fred
Date: October 13, 2004 at 09:02:16 Pacific
Reply:

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.


0

Related Posts

See More



Response Number 6
Name: jubalsams
Date: October 15, 2004 at 01:55:43 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: cpi file bits continuous string

A String in file found in DOS www.computing.net/answers/dos/a-string-in-file-found-in-dos/10597.html

Batch file-put a string in system.ini www.computing.net/answers/dos/batch-fileput-a-string-in-systemini-/9337.html

ReStructering a file's content www.computing.net/answers/dos/restructering-a-files-content/12794.html