Compare commits

...

9 Commits

Author SHA1 Message Date
Kazuki Sakamoto 75aa777464 Snapshot 81
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.909
- Fix adding/closing tab redraw issue
- Support Emoji🐱

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-11-05 16:12:38 -08:00
Kazuki Sakamoto 7d882ca4cf Merge pull request #115 from macvim-dev/feature/emoji
Support Emoji🐱 #65
2015-11-05 15:59:29 -08:00
Kazuki Sakamoto be0e27b5c8 Merge pull request #110 from macvim-dev/fix/tab_redraw_issue
Fix adding/closing tab redraw issue #64
2015-11-05 15:46:30 -08:00
Kazuki Sakamoto 5f465202e8 Merge pull request #117 from macvim-dev/fix/deployment_target
Re-fix #113
2015-11-05 11:13:53 -08:00
Kazuki Sakamoto dfda18a956 Re-fix #113 2015-11-05 10:32:26 -08:00
Kazuki Sakamoto 77bf482db4 Merge pull request #114 from macvim-dev/fix/deployment_target
Fix #113
2015-11-05 09:51:55 -08:00
Kazuki Sakamoto 44244c1e5e Fix #113 2015-11-05 09:28:10 -08:00
Kazuki Sakamoto 81a64f5848 Support Emoji🐱 #65 2015-11-05 09:17:46 -08:00
Kazuki Sakamoto d760cc0dd8 Fix adding/closing tab redraw issue #64 2015-11-04 21:41:29 -08:00
6 changed files with 59 additions and 23 deletions
+1 -1
View File
@@ -1256,7 +1256,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>80</string>
<string>81</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
+2
View File
@@ -1993,8 +1993,10 @@ static void netbeansReadCallback(CFSocketRef s,
const void *bytes = [data bytes];
int idx = *((int*)bytes) + 1;
send_tabline_menu_event(idx, TABLINE_MENU_CLOSE);
[self redrawScreen];
} else if (AddNewTabMsgID == msgid) {
send_tabline_menu_event(0, TABLINE_MENU_NEW);
[self redrawScreen];
} else if (DraggedTabMsgID == msgid) {
if (!data) return;
const void *bytes = [data bytes];
+49 -13
View File
@@ -317,7 +317,18 @@ defaultAdvanceForFont(NSFont *font)
// NOTE: No need to set point size etc. since this is taken from the
// regular font when drawing.
[fontWide release];
fontWide = [newFont retain];
// Use 'Apple Color Emoji' font for rendering emoji
CGFloat size = [newFont pointSize];
NSFontDescriptor *emojiDesc = [NSFontDescriptor
fontDescriptorWithName:@"Apple Color Emoji" size:size];
NSFontDescriptor *newFontDesc = [newFont fontDescriptor];
NSDictionary *attrs = [NSDictionary
dictionaryWithObject:[NSArray arrayWithObject:newFontDesc]
forKey:NSFontCascadeListAttribute];
NSFontDescriptor *desc =
[emojiDesc fontDescriptorByAddingAttributes:attrs];
fontWide = [[NSFont fontWithDescriptor:desc size:size] retain];
}
}
@@ -1028,6 +1039,22 @@ lookupFont(NSMutableArray *fontCache, const unichar *chars, UniCharCount count,
return newFontRef;
}
static UniCharCount
gatherGlyphs(CGGlyph glyphs[], UniCharCount count)
{
// Gather scattered glyphs that was happended by Surrogate pair chars
UniCharCount glyphCount = 0;
NSUInteger pos = 0;
NSUInteger i;
for (i = 0; i < count; ++i) {
if (glyphs[i] != 0) {
++glyphCount;
glyphs[pos++] = glyphs[i];
}
}
return glyphCount;
}
static void
ligatureGlyphsForChars(const unichar *chars, CGGlyph *glyphs, CGPoint *positions, UniCharCount *length, CTFontRef font )
{
@@ -1093,15 +1120,13 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
{
if (CTFontGetGlyphsForCharacters(fontRef, chars, glyphs, length)) {
// All chars were mapped to glyphs, so draw all at once and return.
length = gatherGlyphs(glyphs, length);
if (useLigatures) {
memset(glyphs, 0, sizeof(CGGlyph) * length);
ligatureGlyphsForChars(chars, glyphs, positions, &length, fontRef);
}
CGFontRef cgFontRef = CTFontCopyGraphicsFont(fontRef, NULL);
CGContextSetFont(context, cgFontRef);
CGContextShowGlyphsAtPositions(context, glyphs, positions, length);
CGFontRelease(cgFontRef);
CTFontDrawGlyphs(fontRef, glyphs, positions, length, context);
return;
}
@@ -1113,23 +1138,34 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
// Draw as many consecutive glyphs as possible in the current font
// (if a glyph is 0 that means it does not exist in the current
// font).
BOOL surrogatePair = NO;
while (*g && g < glyphsEnd) {
++g;
++c;
if (CFStringIsSurrogateHighCharacter(*c)) {
surrogatePair = YES;
g += 2;
c += 2;
} else {
++g;
++c;
}
++p;
}
int count = g-glyphs;
CGFontRef cgFontRef = CTFontCopyGraphicsFont(fontRef, NULL);
CGContextSetFont(context, cgFontRef);
CGContextShowGlyphsAtPositions(context, glyphs, positions, count);
CGFontRelease(cgFontRef);
if (surrogatePair)
count = gatherGlyphs(glyphs, count);
CTFontDrawGlyphs(fontRef, glyphs, positions, count, context);
} else {
// Skip past as many consecutive chars as possible which cannot be
// drawn in the current font.
while (0 == *g && g < glyphsEnd) {
++g;
++c;
if (CFStringIsSurrogateHighCharacter(*c)) {
g += 2;
c += 2;
} else {
++g;
++c;
}
++p;
}
+1 -1
View File
@@ -4301,7 +4301,7 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
else
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
macosx_deployment_target=`/usr/bin/sw_vers -productVersion`
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
fi
fi
+1 -1
View File
@@ -189,7 +189,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
LDFLAGS="$save_ldflags" ])
else
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
macosx_deployment_target=`/usr/bin/sw_vers -productVersion`
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\.[[0-9]]*\).*/\1/'`
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
fi
fi
+5 -7
View File
@@ -1244,8 +1244,10 @@ utf_char2cells(c)
static struct interval doublewidth[] =
{
{0x1100, 0x115f},
{0x2329, 0x232a},
{0x2e80, 0x2e99},
{0x2300, 0x23ff},
{0x2700, 0x27bf},
{0x2b00, 0x2bff},
{0x2e00, 0x2e99},
{0x2e9b, 0x2ef3},
{0x2f00, 0x2fd5},
{0x2ff0, 0x2ffb},
@@ -1271,11 +1273,7 @@ utf_char2cells(c)
{0xfe68, 0xfe6b},
{0xff01, 0xff60},
{0xffe0, 0xffe6},
{0x1b000, 0x1b001},
{0x1f200, 0x1f202},
{0x1f210, 0x1f23a},
{0x1f240, 0x1f248},
{0x1f250, 0x1f251},
{0x10000, 0x1fffd},
{0x20000, 0x2fffd},
{0x30000, 0x3fffd}
};