TweeZcodeCompiler / twee_zcode_compiler

compiler project at FU Berlin
MIT License
3 stars 0 forks source link

Text formatting #86

Closed tobiasschuelke closed 9 years ago

lhochstetter commented 9 years ago

First off: compiles fine, programm runs

Example file (according to http://twinery.org/wiki/syntax):

::Start

This text is //italic//.

This text is "bold".

This text is \__underlined\__.

This text is \__"//underlined & bold & italic//"\__.

Frotz issues:

italic is displayed underlined and not italic underlines is displayed with a white background and not underlined the combination will combine the above stated issues bold works as intended

Gargoyle issues:

italic and bold working as intended underlined displays non-underlined text with a black background and white letters *combination works fine, but with the underlined issue remaining

tobiasschuelke commented 9 years ago

Zcode does not support underlined Text. There are four types: italic, bold, fixed pitch and reversed Video. Since underlining emphasizes the text I used reversed video for it. The last one, fixed pitch, seems to be another Name for what is called monospace in twee, so monospace will be translated to fixed pitch. Interpreters do not need to support combined styles - but I think it works quite well with frotz and gargoyle.

lhochstetter commented 9 years ago

In the case of underlined - good idea.

Monospace does not work as intended by twee:

::Start

{{{<<print 123>>}}}

does compile to

123

which actually should be

<<print 123>>

You can use monospace in twee to ignore macros and formatting.