Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Linux Software

Is There A Font Editor That Handles 9 Column Fonts? 3

jared spiegel asks: "After playing with SVGATextMode for a while, I've noticed that using any font as '9x?' interferes with lots of ASCII art (especially with certain 8-bit ASCII characters) since it seems to tack an extra column of white space on the right-most end of each character. I'm guessing this is because of the 8 column font being expanded to 9 columns. I can't find an editor that is capable of creating/editing 9 column fonts, however. CFE and Fonter are the only ones i've found, yet both of these are hard-coded for 8 column fonts. Does such an editor exist?"
This discussion has been archived. No new comments can be posted.

Is There A Font Editor That Handles 9 Column Fonts?

Comments Filter:
  • From what I can see the .psf font format (and most other screen font formats) use a single byte (8 bits) to represent each scanline for the font. Thus, an 8x8 "A" could be represented by 8 bytes as follows:

    Binary Hex
    00010000 10
    00101000 28
    01000100 44
    01111100 7C
    01000100 44
    01000100 44
    00000000 00
    00000000 00

    Thus, it would be impossible to write a font editor which actually could save a 9 bit font correctly in this format.

    Now, the second problem. Even if you could build a 9 bit font, the VGA card wouldn't take it. The reason for this is that all screen fonts are stored on the VGA card in 8 bit format. Fonts on EGA cards were 8 bit wide, and for compatibility, the VGA cards used the same format, even though the characters were rendered using 9 bits. The 9th bit was usually left blank except for characters 0xC0 through 0xDF (the line drawing characters). On most video cards, the video card renders the 9th bit for these characters by copying the 8th bit. Thus, line draw characters SHOULD be continuous as long as the 8th bit is not blank. Note that I said should. If I recall correctly, some video cards handled the 9th bit stuff incorrectly - either copying when they shouldn't or the other way around.

    So, what I would do is create a 8 bit font making sure not to leave a margin on the line draw characters and see if it eliminates your problem. If it doesn't try another video card or just live with it. I guess there is also the possibility that some video cards may have this setting configurable, but that would require some digging and I can't say I've ever seen (or even looked for) a video card with this capability.

    Good luck!

  • SVGATextMode, "creating_textmodes_from_scratch.HTOWTO":

    SVGATextMode supports 8- and 9-pixel wide fonts, but both use the _same_ font file.

    VGA cards use a strange trick to get a character cell of 9 pixels. It's
    actually a cell of just 8 characters, but with a 9th, empty (black) pixel
    appended to it.

    This exploits the fact that (almost) all fonts need character spacing
    between them, and thus all "normal" 8-pixel fonts used to have one or more
    black rows on the right side and below the characters anyway. Using this
    trick, you can fill the 8-pixel font definition a little more (=higher
    resolution), using the full 8-pixel resolution available in the 8-pixel
    cell, and let the VGA chip add the black space (or at least part of it)
    between characters.

    There's just one catch: the VGA chip must STILL be programmed as if it were
    doing a 8-pixel font ,even when using a 9-pixel cell width.

  • Not ass, OS. You lefties need to realise that accurate spelling is not an oppressive sign of the man's dominance.

    If I had the points right now, I'd mod that up with a "funny". I'm probably one of the biggest spelling nazis on the face of the planet. Also, I'm not even close to being a lefty.

    Good comeback, though.


    --LordEq

    Tho' your promise count for nothing

"I've seen it. It's rubbish." -- Marvin the Paranoid Android

Working...