added italics mode

This commit is contained in:
Jorj Bauer 2017-02-22 03:54:37 -05:00
parent 94dfcdf480
commit 737d9dec75
2 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,7 @@ void Fx80::Reset()
escapeModeExpectingBytes = -1;
escapeModeLengthByteCount = 0;
escapeModeLength = 0;
italicsMode = false;
}
void Fx80::handleEscape(uint8_t c)
@ -77,6 +78,12 @@ void Fx80::handleEscape(uint8_t c)
case 42: // FIXME: set vertical tabs
case 43: // FIXME: set form length (default: 66 lines, 11 inches)
break;
case 52: // italics on
italicsMode = true;
break;
case 53: // italics off
italicsMode = false;
break;
case 64: // Reset
Reset();
break;
@ -267,6 +274,10 @@ void Fx80::addCharacter(uint8_t c)
}
}
if (italicsMode) {
c += 128;
}
uint8_t width = Fx80Font[c * 19];
// FIXME: is 12 right for non-proportional mode?
if (!proportionalMode)

View File

@ -86,6 +86,7 @@ class Fx80 {
uint8_t rowOfBits[(FX80_MAXWIDTH/8)*9];
Charset charsetEnabled;
bool italicsMode;
};
#endif