Fixed bug: extra empty lines at the end
Added function: output specified characters when the foreground and background colors are similar to reduce the rendering pressure and space occupation of half-height characters