File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/browser/renderer/shared Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -613,7 +613,14 @@ export class TextureAtlas implements ITextureAtlas {
613613 nextOffset = computeNextVariantOffset ( xChRight - xChLeft , lineWidth , nextOffset ) ;
614614 break ;
615615 case UnderlineStyle . DASHED :
616- this . _tmpCtx . setLineDash ( [ this . _config . devicePixelRatio * 4 , this . _config . devicePixelRatio * 3 ] ) ;
616+ const lineRatio = 0.6 ;
617+ const gapRatio = 0.3 ;
618+ // End line ratio is approximately equal to 0.1
619+ const xChWidth = xChRight - xChLeft ;
620+ const line = Math . floor ( lineRatio * xChWidth ) ;
621+ const gap = Math . floor ( gapRatio * xChWidth ) ;
622+ const end = xChWidth - line - gap ;
623+ this . _tmpCtx . setLineDash ( [ line , gap , end ] ) ;
617624 this . _tmpCtx . moveTo ( xChLeft , yTop ) ;
618625 this . _tmpCtx . lineTo ( xChRight , yTop ) ;
619626 break ;
You can’t perform that action at this time.
0 commit comments