This repository was archived by the owner on Nov 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1553,14 +1553,14 @@ void CalculateDefaultTextMetrics()
15531553 new VisualLineTextParagraphProperties { defaultTextRunProperties = textRunProperties } ,
15541554 null ) )
15551555 {
1556- wideSpaceWidth = Math . Max ( 1 , line . WidthIncludingTrailingWhitespace ) ;
1557- defaultBaseline = Math . Max ( 1 , line . Baseline ) ;
1558- defaultLineHeight = Math . Max ( 1 , line . Height ) ;
1556+ wideSpaceWidth = Math . Ceiling ( Math . Max ( 1 , line . WidthIncludingTrailingWhitespace ) ) ;
1557+ defaultBaseline = Math . Ceiling ( Math . Max ( 1 , line . Baseline ) ) ;
1558+ defaultLineHeight = Math . Ceiling ( Math . Max ( 1 , line . Height ) ) ;
15591559 }
15601560 } else {
1561- wideSpaceWidth = FontSize / 2 ;
1562- defaultBaseline = FontSize ;
1563- defaultLineHeight = FontSize + 3 ;
1561+ wideSpaceWidth = Math . Ceiling ( FontSize / 2 ) ;
1562+ defaultBaseline = Math . Ceiling ( FontSize ) ;
1563+ defaultLineHeight = Math . Ceiling ( FontSize + 3 ) ;
15641564 }
15651565 // Update heightTree.DefaultLineHeight, if a document is loaded.
15661566 if ( heightTree != null )
You can’t perform that action at this time.
0 commit comments