File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -464,13 +464,15 @@ - (void)setFont:(NSFont*)aFont nafont:(NSFont *)naFont horizontalSpacing:(float)
464
464
NSFontManager * fontManager = [NSFontManager sharedFontManager ];
465
465
#endif
466
466
NSSize sz = [PTYTextView charSizeForFont: aFont horizontalSpacing: 1.0 verticalSpacing: 1.0 ];
467
-
467
+ sz.width = ceil (sz.width );
468
+ sz.height = ceil (sz.height );
469
+
468
470
charWidthWithoutSpacing = sz.width ;
469
471
charHeightWithoutSpacing = sz.height ;
470
472
horizontalSpacing_ = horizontalSpacing;
471
473
verticalSpacing_ = verticalSpacing;
472
- charWidth = charWidthWithoutSpacing * horizontalSpacing;
473
- lineHeight = charHeightWithoutSpacing * verticalSpacing;
474
+ charWidth = ceil ( charWidthWithoutSpacing * horizontalSpacing) ;
475
+ lineHeight = ceil ( charHeightWithoutSpacing * verticalSpacing) ;
474
476
[font release ];
475
477
[aFont retain ];
476
478
font=aFont;
@@ -977,9 +979,9 @@ - (void)drawRect:(NSRect)rect
977
979
float g = ((float)((i + 33) % 100)) / 100;
978
980
float b = ((float)((i + 66) % 100)) / 100;
979
981
[[NSColor colorWithDeviceRed:r green:g blue:b alpha:1] set];
980
- #endif
981
-
982
+ #else
982
983
[defaultBGColor set ];
984
+ #endif
983
985
NSRectFill (excessRect);
984
986
985
987
#if 0
@@ -2736,7 +2738,7 @@ - (void) _drawCursor
2736
2738
else
2737
2739
showCursor = YES ;
2738
2740
2739
- if (CURSOR) {
2741
+ if (CURSOR) {
2740
2742
if (showCursor && x1 < WIDTH && x1 >= 0 && yStart >= 0 && yStart < HEIGHT) {
2741
2743
curX = floor (x1 * charWidth + MARGIN);
2742
2744
curY = (yStart + [dataSource numberOfLines ] - HEIGHT + 1 ) * lineHeight - cursorHeight;
You can’t perform that action at this time.
0 commit comments