Describe Cell width as a narrow/wide boolean.
A character cell can only be either narrow or wide. It's more convenient to represent that as an int containing 1 or 2, but slightly more correct to represent it as a "boolean" single-bit integer.
This commit is contained in:
@@ -106,7 +106,7 @@ void Emulator::print( const Parser::Print *act )
|
||||
|
||||
fb.reset_cell( this_cell );
|
||||
this_cell->append( ch );
|
||||
this_cell->set_width( chwidth );
|
||||
this_cell->set_wide( chwidth == 2 ); /* chwidth had better be 1 or 2 here */
|
||||
fb.apply_renditions_to_cell( this_cell );
|
||||
|
||||
if ( chwidth == 2 ) { /* erase overlapped cell */
|
||||
@@ -131,7 +131,7 @@ void Emulator::print( const Parser::Print *act )
|
||||
base character [e.g. start of line], if the
|
||||
combining character has been cleared with
|
||||
a sequence like ED ("J") or EL ("K") */
|
||||
assert( combining_cell->get_width() == 1 );
|
||||
assert( !combining_cell->get_wide() );
|
||||
combining_cell->set_fallback( true );
|
||||
fb.ds.move_col( 1, true, true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user