Post Reply 
Fixed width font for terminal emulator
04-08-2024, 12:09 AM
Post: #10
RE: Fixed width font for terminal emulator
As Guenter Schink pointed out, even with error-free syntax and arguments, there are TEXTOUT_P forms that will not respond to the format flag settings. At least on my Prime G2 with version D firmware, I have found what will consistently work for text formatting with the PRINT2D function. Unfortunately the set of working formats do not include italics and monospace fonts.
I set each bit in turn in a 16-bit flag word as well as found that combined formatting bits will work. In its simplest form, here's what I found for PRINT2D(): just five flag bits are active.

// So, these bits are active only: BITS 4:0
// Bit 0: BOLD Bit 8: -DEAD-
// Bit 1: UNDERLINE Bit 9: -DEAD-
// Bit 2: STRIKETHRU Bit 10: -DEAD-
// Bit 3: CENTER Bit 11: -DEAD-
// Bit 4: RIGHT Bit 12: -DEAD-
// Bit 5: -DEAD- Bit 13: -DEAD-
// Bit 6: -DEAD- Bit 14: -DEAD-
// Bit 7: -DEAD- Bit 15: -DEAD-


For RED font color(#FF0000h) and format flag set to #01h for bold font:
PRINT2D("This is BOLD.", 1, #FF0000h, #01h);


Here dark GREEN font color with a combined bold and strikethru formatting:
PRINT2D("This is bold and strikethru.", 1, #008800h, #05h);

You can apply a bitwise OR function to combine formats:
PRINT2D("Mix flgs BOLD & CENTER", 1, #FF0000h, (BITOR(flg_BOLD, flg_CENTER)));
Where the constant flag values have been defined as,
flg_BOLD:=#01h;
flg_CENTER:=#08h;
The BITOR() functions returns #09h.

I will welcome any help in getting monospace and italics to work. Please post if you've done it!

Barry
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fixed width font for terminal emulator - BarryW - 04-08-2024 12:09 AM



User(s) browsing this thread: 2 Guest(s)