@@ -449,6 +449,7 @@ export class TextureAtlas implements ITextureAtlas {
449449 const italic = ! ! this . _workAttributeData . isItalic ( ) ;
450450 const underline = ! ! this . _workAttributeData . isUnderline ( ) ;
451451 const strikethrough = ! ! this . _workAttributeData . isStrikethrough ( ) ;
452+ const overline = ! ! this . _workAttributeData . isOverline ( ) ;
452453 let fgColor = this . _workAttributeData . getFgColor ( ) ;
453454 let fgColorMode = this . _workAttributeData . getFgColorMode ( ) ;
454455 let bgColor = this . _workAttributeData . getBgColor ( ) ;
@@ -632,12 +633,24 @@ export class TextureAtlas implements ITextureAtlas {
632633 }
633634 }
634635
636+ // Overline
637+ if ( overline ) {
638+ const lineWidth = Math . max ( 1 , Math . floor ( this . _config . fontSize * this . _config . devicePixelRatio / 15 ) ) ;
639+ const yOffset = lineWidth % 2 === 1 ? 0.5 : 0 ;
640+ this . _tmpCtx . lineWidth = lineWidth ;
641+ this . _tmpCtx . strokeStyle = this . _tmpCtx . fillStyle ;
642+ this . _tmpCtx . beginPath ( ) ;
643+ this . _tmpCtx . moveTo ( padding , padding + yOffset ) ;
644+ this . _tmpCtx . lineTo ( padding + this . _config . deviceCharWidth * chWidth , padding + yOffset ) ;
645+ this . _tmpCtx . stroke ( ) ;
646+ }
647+
635648 // Draw the character
636649 if ( ! customGlyph ) {
637650 this . _tmpCtx . fillText ( chars , padding , padding + this . _config . deviceCharHeight ) ;
638651 }
639652
640- // If this charcater is underscore and beyond the cell bounds, shift it up until it is visible
653+ // If this character is underscore and beyond the cell bounds, shift it up until it is visible
641654 // even on the bottom row, try for a maximum of 5 pixels.
642655 if ( chars === '_' && ! this . _config . allowTransparency ) {
643656 let isBeyondCellBounds = clearColor ( this . _tmpCtx . getImageData ( padding , padding , this . _config . deviceCellWidth , this . _config . deviceCellHeight ) , backgroundColor , foregroundColor , enableClearThresholdCheck ) ;
0 commit comments