mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Turn off ligatures by default
Turn off all common ligatures (fi, ffi) and rare ligatures (ct, ss).
This commit is contained in:
committed by
Bjorn Winckler
parent
f96c9a6845
commit
8c8db3cd4c
@@ -851,6 +851,14 @@ enum {
|
||||
&fontID, &fontSize, &fontWidth, &transform, &options, &font
|
||||
};
|
||||
|
||||
ATSUFontFeatureType featureTypes[] = {
|
||||
kLigaturesType, kLigaturesType
|
||||
};
|
||||
|
||||
ATSUFontFeatureSelector featureSelectors[] = {
|
||||
kCommonLigaturesOffSelector, kRareLigaturesOffSelector
|
||||
};
|
||||
|
||||
for (i = 0; i < MMMaxCellsPerChar; i++)
|
||||
{
|
||||
fontWidth = Long2Fix(cellSize.width * (i + 1));
|
||||
@@ -862,6 +870,11 @@ enum {
|
||||
ATSUDisposeStyle(atsuStyles[i]);
|
||||
atsuStyles[i] = NULL;
|
||||
}
|
||||
|
||||
// Turn off ligatures by default
|
||||
ATSUSetFontFeatures(atsuStyles[i],
|
||||
sizeof(featureTypes) / sizeof(featureTypes[0]),
|
||||
featureTypes, featureSelectors);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +302,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
bg, NSBackgroundColorAttributeName,
|
||||
fg, NSForegroundColorAttributeName,
|
||||
sp, NSUnderlineColorAttributeName,
|
||||
[NSNumber numberWithInt:0], NSLigatureAttributeName,
|
||||
nil];
|
||||
|
||||
if (flags & DRAW_UNDERL) {
|
||||
|
||||
Reference in New Issue
Block a user