Permalink
Browse files

Change default font to Menlo

On system where Menlo is missing (i.e. OS X 10.5 and earlier) Monaco
will be used instead.
  • Loading branch information...
b4winckler committed Jul 26, 2010
1 parent 4efc4c3 commit 21baffc2a586d79a1487b20022240038daacf2e5
View
@@ -266,7 +266,6 @@ Here is a list of relevant dictionary entries:
KEY VALUE ~
MMCellWidthMultiplier width of a normal glyph in em units [float]
MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool]
-MMLoadDefaultFont load font (disable for faster startup) [bool]
MMLoginShellArgument login shell parameter [string]
MMLoginShellCommand which shell to use to launch Vim [string]
MMNoFontSubstitution disable automatic font substitution [bool]
@@ -711,16 +710,6 @@ Enabling localized menus breaks the toolbar and the menus as well.
Solution: ~
This is a known problem, see |macvim-todo|.
-Scenario: ~
-You dislike the default font (DejaVu Sans Mono).
-Solution: ~
-The standard fixed width font on Mac OS X is Menlo (it used to be Monaco prior
-to OS X 10.6). If you prefer this font then add the following line to your
-"~/.gvimrc": >
- set guifont=Menlo:h11
-The suffix ":h11" specifies the point size of the font should be "11" (see
-'guifont' for more information on how to set the font).
-
Scenario: ~
When you click the (green) zoom button you want the window to maximize
horizontally as well as vertically.
View
@@ -41,8 +41,6 @@ Thank you to {\field{\*\fldinst{HYPERLINK "http://www.positivespinmedia.com"}}{\
\
Toolbar icons by {\field{\*\fldinst{HYPERLINK "http://www.mattballdesign.com/"}}{\fldrslt Matt Ball}} (free Developer Icons), {\field{\*\fldinst{HYPERLINK "http://www.jonasraskdesign.com/"}}{\fldrslt Jonas Rask}} (Danish Royalty Free icon set), and {\field{\*\fldinst{HYPERLINK "http://www.everaldo.com"}}{\fldrslt Everaldo Coelho}} (Crystal Project Icons, released under LGPL license).\
\
-The default font in MacVim, DejaVu Sans Mono, is based on the Bitstream Vera\'99 and Arev fonts. Bitstream Vera\'99 is \'a9 2003 by Bitstream, Inc. Arev is \'a9 2006 by Tavmjong Bah. The DejaVu changes to these fonts are in the public domain.\
-\
Thanks to Andy Matuschak for {\field{\*\fldinst{HYPERLINK "http://sparkle.andymatuschak.org/"}}{\fldrslt Sparkle}}.\
\
Thanks to Damien Guard for {\field{\*\fldinst{HYPERLINK "http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released"}}{\fldrslt Envy Code R}} (used in MacVim's 16x16 document icons).}
@@ -20,7 +20,6 @@
NSConnection *connection;
NSMutableArray *vimControllers;
NSString *openSelectionString;
- ATSFontContainerRef fontContainerRef;
NSMutableDictionary *pidArguments;
NSMenu *defaultMainMenu;
NSMenuItem *appMenuItemTemplate;
@@ -128,7 +128,6 @@ - (void)activateWhenNextWindowOpens;
- (void)startWatchingVimDir;
- (void)stopWatchingVimDir;
- (void)handleFSEvent;
-- (void)loadDefaultFont;
- (int)executeInLoginShell:(NSString *)path arguments:(NSArray *)args;
- (void)reapChildProcesses:(id)sender;
- (void)processInputQueues:(id)sender;
@@ -210,7 +209,6 @@ + (void)initialize
[NSNumber numberWithBool:NO], MMVerticalSplitKey,
[NSNumber numberWithInt:0], MMPreloadCacheSizeKey,
[NSNumber numberWithInt:0], MMLastWindowClosedBehaviorKey,
- [NSNumber numberWithBool:YES], MMLoadDefaultFontKey,
#ifdef INCLUDE_OLD_IM_CODE
[NSNumber numberWithBool:YES], MMUseInlineImKey,
#endif // INCLUDE_OLD_IM_CODE
@@ -232,8 +230,6 @@ - (id)init
{
if (!(self = [super init])) return nil;
- [self loadDefaultFont];
-
vimControllers = [NSMutableArray new];
cachedVimControllers = [NSMutableArray new];
preloadPid = -1;
@@ -613,14 +609,6 @@ - (void)applicationWillTerminate:(NSNotification *)notification
// connection).
[connection invalidate];
- // Deactivate the font we loaded from the app bundle.
- // NOTE: This can take quite a while (~500 ms), so termination will be
- // noticeably faster if loading of the default font is disabled.
- if (fontContainerRef) {
- ATSFontDeactivate(fontContainerRef, NULL, kATSOptionFlagsDefault);
- fontContainerRef = 0;
- }
-
[NSApp setDelegate:nil];
// Try to wait for all child processes to avoid leaving zombies behind (but
@@ -2024,57 +2012,6 @@ - (void)handleFSEvent
[self scheduleVimControllerPreloadAfterDelay:0.5];
}
-- (void)loadDefaultFont
-{
- // It is possible to set a user default to avoid loading the default font
- // (this cuts down on startup time).
- if (![[NSUserDefaults standardUserDefaults] boolForKey:MMLoadDefaultFontKey]
- || fontContainerRef) {
- ASLogInfo(@"Skip loading of the default font...");
- return;
- }
-
- ASLogInfo(@"Loading the default font...");
-
- // Load all fonts in the Resouces folder of the app bundle.
- NSString *fontsFolder = [[NSBundle mainBundle] resourcePath];
- if (fontsFolder) {
- NSURL *fontsURL = [NSURL fileURLWithPath:fontsFolder];
- if (fontsURL) {
- FSRef fsRef;
- CFURLGetFSRef((CFURLRef)fontsURL, &fsRef);
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- // This is the font activation API for OS X 10.5. Only compile
- // this code if we're building on OS X 10.5 or later.
- if (NULL != ATSFontActivateFromFileReference) { // Weakly linked
- ATSFontActivateFromFileReference(&fsRef, kATSFontContextLocal,
- kATSFontFormatUnspecified,
- NULL, kATSOptionFlagsDefault,
- &fontContainerRef);
- }
-#endif
-#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
- // The following font activation API was deprecated in OS X 10.5.
- // Don't compile this code unless we're targeting OS X 10.4.
- FSSpec fsSpec;
- if (fontContainerRef == 0 &&
- FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL,
- &fsSpec, NULL) == noErr) {
- ATSFontActivateFromFileSpecification(&fsSpec,
- kATSFontContextLocal, kATSFontFormatUnspecified, NULL,
- kATSOptionFlagsDefault, &fontContainerRef);
- }
-#endif
- }
- }
-
- if (!fontContainerRef) {
- ASLogNotice(@"Failed to activate the default font (the app bundle "
- "may be incomplete)");
- }
-}
-
- (int)executeInLoginShell:(NSString *)path arguments:(NSArray *)args
{
// Start a login shell and execute the command 'path' with arguments 'args'
@@ -688,9 +688,9 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
encoding:NSUTF8StringEncoding];
NSFont *font = [NSFont fontWithName:name size:size];
if (!font) {
- // This should only happen if the default font was not loaded in
- // which case we fall back on using the Cocoa default fixed width
- // font.
+ // This should only happen if the system default font has changed
+ // name since MacVim was compiled in which case we fall back on
+ // using the user fixed width font.
font = [NSFont userFixedPitchFontOfSize:size];
}
@@ -20,10 +20,6 @@
1D1474BC0C567A910038FA2B /* MMWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D1474BA0C567A910038FA2B /* MMWindowController.m */; };
1D22374B0E45DF4800E6FFFF /* Advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = 1D22374A0E45DF4800E6FFFF /* Advanced.png */; };
1D384A0E100D671700D3C22F /* KeyBinding.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D384A0D100D671700D3C22F /* KeyBinding.plist */; };
- 1D3D19110CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190D0CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf */; };
- 1D3D19120CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */; };
- 1D3D19130CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */; };
- 1D3D19140CA690FF0004A0A5 /* DejaVuSansMono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */; };
1D44972211FCA9B400B0630F /* MMCoreTextView+ToolTip.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D44972111FCA9B400B0630F /* MMCoreTextView+ToolTip.m */; };
1D493D580C5247BF00AB718C /* Vim in Copy Executables */ = {isa = PBXBuildFile; fileRef = 1D493D570C5247BF00AB718C /* Vim */; };
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
@@ -156,10 +152,6 @@
1D1474BA0C567A910038FA2B /* MMWindowController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMWindowController.m; sourceTree = "<group>"; };
1D22374A0E45DF4800E6FFFF /* Advanced.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Advanced.png; sourceTree = "<group>"; };
1D384A0D100D671700D3C22F /* KeyBinding.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = KeyBinding.plist; sourceTree = "<group>"; };
- 1D3D190D0CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-Bold.ttf"; path = "dejavu-ttf/DejaVuSansMono-Bold.ttf"; sourceTree = "<group>"; };
- 1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-BoldOblique.ttf"; path = "dejavu-ttf/DejaVuSansMono-BoldOblique.ttf"; sourceTree = "<group>"; };
- 1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "DejaVuSansMono-Oblique.ttf"; path = "dejavu-ttf/DejaVuSansMono-Oblique.ttf"; sourceTree = "<group>"; };
- 1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = DejaVuSansMono.ttf; path = "dejavu-ttf/DejaVuSansMono.ttf"; sourceTree = "<group>"; };
1D44972111FCA9B400B0630F /* MMCoreTextView+ToolTip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MMCoreTextView+ToolTip.m"; sourceTree = "<group>"; };
1D493D570C5247BF00AB718C /* Vim */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = Vim; path = ../Vim; sourceTree = SOURCE_ROOT; };
1D493DB30C52533B00AB718C /* PSMTabBarControl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PSMTabBarControl.xcodeproj; path = PSMTabBarControl/PSMTabBarControl.xcodeproj; sourceTree = "<group>"; };
@@ -318,10 +310,6 @@
1D0F11480D58C77800D5DA09 /* Font */ = {
isa = PBXGroup;
children = (
- 1D3D190D0CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf */,
- 1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */,
- 1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */,
- 1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */,
);
name = Font;
sourceTree = "<group>";
@@ -506,10 +494,6 @@
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */,
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */,
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */,
- 1D3D19110CA690FF0004A0A5 /* DejaVuSansMono-Bold.ttf in Resources */,
- 1D3D19120CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf in Resources */,
- 1D3D19130CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf in Resources */,
- 1D3D19140CA690FF0004A0A5 /* DejaVuSansMono.ttf in Resources */,
1DE3F8E70D50F80500052B9E /* Preferences.nib in Resources */,
0395A8AA0D72D88B00881434 /* General.png in Resources */,
1DD3D51E0D82D4C9006E4320 /* ibeam.png in Resources */,
@@ -49,7 +49,6 @@ extern NSString *MMOpenLayoutKey;
extern NSString *MMVerticalSplitKey;
extern NSString *MMPreloadCacheSizeKey;
extern NSString *MMLastWindowClosedBehaviorKey;
-extern NSString *MMLoadDefaultFontKey;
#ifdef INCLUDE_OLD_IM_CODE
extern NSString *MMUseInlineImKey;
#endif // INCLUDE_OLD_IM_CODE
@@ -41,7 +41,6 @@
NSString *MMVerticalSplitKey = @"MMVerticalSplit";
NSString *MMPreloadCacheSizeKey = @"MMPreloadCacheSize";
NSString *MMLastWindowClosedBehaviorKey = @"MMLastWindowClosedBehavior";
-NSString *MMLoadDefaultFontKey = @"MMLoadDefaultFont";
#ifdef INCLUDE_OLD_IM_CODE
NSString *MMUseInlineImKey = @"MMUseInlineIm";
#endif // INCLUDE_OLD_IM_CODE
@@ -1,44 +0,0 @@
-Adrian Schroeter
-Andrey Valentinovich Panov
-Ben Laenen
-Besarion Gugushvili
-Bhikkhu Pesala
-Clayborne Arevalo
-Dafydd Harries
-Danilo Segan
-Davide Viti
-David Jez
-David Lawrence Ramsey
-Denis Jacquerye
-Dwayne Bailey
-Eugeniy Meshcheryakov
-Gee Fung Sit
-Heikki Lindroos
-James Cloos
-James Crippen
-John Karp
-Keenan Pepper
-Lars Naesbye Christensen
-Mashrab Kuvatov
-Max Berger
-Mederic Boquien
-Michael Everson
-Misu Moldovan
-Nguyen Thai Ngoc Duy
-Nicolas Mailhot
-Ognyan Kulev
-Ondrej Koala Vacha
-Peter Cernak
-Remy Oudompheng
-Roozbeh Pournader
-Sahak Petrosyan
-Sander Vesik
-Stepan Roh
-Stephen Hartke
-Tavmjong Bah
-Tim May
-Valentin Stoykov
-Vasek Stodulka
-Wesley Transue
-
-$Id: AUTHORS 2162 2007-12-27 12:39:07Z ben_laenen $
@@ -1,3 +0,0 @@
-See http://dejavu.sourceforge.net/wiki/index.php/Bugs
-
-$Id: BUGS 80 2004-11-13 13:12:02Z src $
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,99 +0,0 @@
-Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
-Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
-
-Bitstream Vera Fonts Copyright
-------------------------------
-
-Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
-a trademark of Bitstream, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of the fonts accompanying this license ("Fonts") and associated
-documentation files (the "Font Software"), to reproduce and distribute the
-Font Software, including without limitation the rights to use, copy, merge,
-publish, distribute, and/or sell copies of the Font Software, and to permit
-persons to whom the Font Software is furnished to do so, subject to the
-following conditions:
-
-The above copyright and trademark notices and this permission notice shall
-be included in all copies of one or more of the Font Software typefaces.
-
-The Font Software may be modified, altered, or added to, and in particular
-the designs of glyphs or characters in the Fonts may be modified and
-additional glyphs or characters may be added to the Fonts, only if the fonts
-are renamed to names not containing either the words "Bitstream" or the word
-"Vera".
-
-This License becomes null and void to the extent applicable to Fonts or Font
-Software that has been modified and is distributed under the "Bitstream
-Vera" names.
-
-The Font Software may be sold as part of a larger software package but no
-copy of one or more of the Font Software typefaces may be sold by itself.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
-TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
-FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
-ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
-FONT SOFTWARE.
-
-Except as contained in this notice, the names of Gnome, the Gnome
-Foundation, and Bitstream Inc., shall not be used in advertising or
-otherwise to promote the sale, use or other dealings in this Font Software
-without prior written authorization from the Gnome Foundation or Bitstream
-Inc., respectively. For further information, contact: fonts at gnome dot
-org.
-
-Arev Fonts Copyright
-------------------------------
-
-Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the fonts accompanying this license ("Fonts") and
-associated documentation files (the "Font Software"), to reproduce
-and distribute the modifications to the Bitstream Vera Font Software,
-including without limitation the rights to use, copy, merge, publish,
-distribute, and/or sell copies of the Font Software, and to permit
-persons to whom the Font Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright and trademark notices and this permission notice
-shall be included in all copies of one or more of the Font Software
-typefaces.
-
-The Font Software may be modified, altered, or added to, and in
-particular the designs of glyphs or characters in the Fonts may be
-modified and additional glyphs or characters may be added to the
-Fonts, only if the fonts are renamed to names not containing either
-the words "Tavmjong Bah" or the word "Arev".
-
-This License becomes null and void to the extent applicable to Fonts
-or Font Software that has been modified and is distributed under the
-"Tavmjong Bah Arev" names.
-
-The Font Software may be sold as part of a larger software package but
-no copy of one or more of the Font Software typefaces may be sold by
-itself.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
-TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
-
-Except as contained in this notice, the name of Tavmjong Bah shall not
-be used in advertising or otherwise to promote the sale, use or other
-dealings in this Font Software without prior written authorization
-from Tavmjong Bah. For further information, contact: tavmjong @ free
-. fr.
-
-$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
Oops, something went wrong.

0 comments on commit 21baffc

Please sign in to comment.