diff --git a/apple/fx80.cpp b/apple/fx80.cpp index eb77d99..e726233 100644 --- a/apple/fx80.cpp +++ b/apple/fx80.cpp @@ -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) diff --git a/apple/fx80.h b/apple/fx80.h index abd7115..a0e4830 100644 --- a/apple/fx80.h +++ b/apple/fx80.h @@ -86,6 +86,7 @@ class Fx80 { uint8_t rowOfBits[(FX80_MAXWIDTH/8)*9]; Charset charsetEnabled; + bool italicsMode; }; #endif