@@ -133,21 +133,6 @@ - (void)invertBlockFromRow:(int)row column:(int)col numRows:(int)nrows
133
133
return [@" m" sizeWithAttributes: a].width ;
134
134
}
135
135
136
- NSFont *fontWithFixedAdvanceCascadeList (NSFont *font, CGFloat advance) {
137
- NSArray *cascadeList = (NSArray *)CTFontCopyDefaultCascadeListForLanguages ((CTFontRef)font, nil );
138
- NSMutableArray *fixedWidthCascadeList = [NSMutableArray arrayWithCapacity: cascadeList.count];
139
- NSDictionary *fixedAdvanceAttributeDict = @{
140
- NSFontFixedAdvanceAttribute : @(advance),
141
- };
142
- for (NSFontDescriptor * descriptor in cascadeList) {
143
- [fixedWidthCascadeList addObject: [descriptor fontDescriptorByAddingAttributes: fixedAdvanceAttributeDict]];
144
- }
145
- return [NSFont fontWithDescriptor: [font.fontDescriptor fontDescriptorByAddingAttributes: @{
146
- NSFontCascadeListAttribute : fixedWidthCascadeList,
147
- NSFontFixedAdvanceAttribute : @(advance),
148
- }] size: font.pointSize];
149
- }
150
-
151
136
typedef struct {
152
137
unsigned color;
153
138
int shape;
@@ -405,7 +390,7 @@ - (void)setFont:(NSFont *)newFont
405
390
cellSize.height = linespace + defaultLineHeightForFont (newFont);
406
391
407
392
[font release ];
408
- font = [fontWithFixedAdvanceCascadeList ( newFont, cellSize.width) retain ];
393
+ font = [newFont retain ];
409
394
fontDescent = ceil (CTFontGetDescent ((CTFontRef)font));
410
395
411
396
[self clearAll ];
@@ -422,7 +407,7 @@ - (void)setWideFont:(NSFont *)newFont
422
407
if (font) [self setWideFont: font];
423
408
} else if (newFont != fontWide) {
424
409
[fontWide release ];
425
- fontWide = [fontWithFixedAdvanceCascadeList ( newFont, cellSize.width * 2 ) retain ];
410
+ fontWide = [newFont retain ];
426
411
}
427
412
}
428
413
0 commit comments