Skip to content

Commit

Permalink
* Bundling FreeMono font with the application.
Browse files Browse the repository at this point in the history
git-svn-id: https://iterm.svn.sourceforge.net/svnroot/iterm/trunk@454 a86d2aa4-6e2d-4ff4-9c10-3c044852e7c9
  • Loading branch information
ujwal committed May 5, 2003
1 parent 5bbf0ba commit 499f961
Show file tree
Hide file tree
Showing 20 changed files with 112 additions and 10 deletions.
5 changes: 5 additions & 0 deletions Changelog
@@ -1,3 +1,8 @@
2003-05-05 ujwal

* Bundling FreeMono font with the application.


2003-05-02 ujwal

* Distinguising session name and windwo title. Storing window
Expand Down
3 changes: 2 additions & 1 deletion English.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified English.lproj/MainMenu.nib/objects.nib
Binary file not shown.
Binary file added Fonts/FreeMono.ttf
Binary file not shown.
Binary file added Fonts/FreeMonoBold.ttf
Binary file not shown.
Binary file added Fonts/FreeMonoBoldOblique.ttf
Binary file not shown.
Binary file added Fonts/FreeMonoOblique.ttf
Binary file not shown.
3 changes: 2 additions & 1 deletion French.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified French.lproj/MainMenu.nib/objects.nib
Binary file not shown.
3 changes: 2 additions & 1 deletion Japanese.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Japanese.lproj/MainMenu.nib/objects.nib
Binary file not shown.
3 changes: 2 additions & 1 deletion Korean.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Korean.lproj/MainMenu.nib/objects.nib
Binary file not shown.
20 changes: 19 additions & 1 deletion MainMenu.m
@@ -1,5 +1,5 @@
// -*- mode:objc -*-
// $Id: MainMenu.m,v 1.57 2003-05-05 14:44:07 ujwal Exp $
// $Id: MainMenu.m,v 1.58 2003-05-05 22:53:34 ujwal Exp $
/*
** MainMenu.m
**
Expand Down Expand Up @@ -154,6 +154,24 @@ - (id) init
#endif
self = [super init];

// activate our fonts
// Get the main bundle object
NSBundle *appBundle = [NSBundle mainBundle];
// Ask for the path to the resources
NSString *fontsPath = [appBundle pathForResource: @"Fonts" ofType: nil inDirectory: nil];

// Using the Carbon APIs: get a file reference and spec for the path
FSRef fsRef;
FSSpec fsSpec;
int osstatus = FSPathMakeRef( [fontsPath UTF8String], &fsRef, NULL);
if ( osstatus == noErr)
{
osstatus = FSGetCatalogInfo( &fsRef, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL);
}
//activate the font file using the file spec
osstatus = FMActivateFonts( &fsSpec, NULL, NULL, kFMLocalActivationContext);


[self initAddressBook];
[self initPreferences];
encodingList=[NSString availableStringEncodings];
Expand Down
6 changes: 3 additions & 3 deletions PreferencePanel.m
@@ -1,4 +1,4 @@
// $Id: PreferencePanel.m,v 1.44 2003-05-01 16:28:43 yfabian Exp $
// $Id: PreferencePanel.m,v 1.45 2003-05-05 22:53:34 ujwal Exp $
/*
** PreferencePanel.m
**
Expand Down Expand Up @@ -41,8 +41,8 @@
static NSColor *xtermBold;
static NSColor* xtermColorTable[2][8];

static NSString *DEFAULT_FONTNAME = @"Osaka-Mono";
static float DEFAULT_FONTSIZE = 14;
static NSString *DEFAULT_FONTNAME = @"FreeMonoBold";
static float DEFAULT_FONTSIZE = 13;
static NSFont* FONT;

static int COL = 80;
Expand Down
70 changes: 70 additions & 0 deletions iTerm.pbproj/project.pbxproj
Expand Up @@ -38,6 +38,7 @@
0464AB22006CD2EC7F000001,
0464AB27006CD2EC7F000001,
0464AB2E006CD2EC7F000001,
8750B974046717F40073D10E,
0464AB32006CD2EC7F000001,
);
isa = PBXGroup;
Expand Down Expand Up @@ -175,6 +176,7 @@
0464AB4B006CD2EC7F000001,
0464AB4E006CD2EC7F000001,
DD1E48DF0432063D00A8A065,
8750B97D0467185B0073D10E,
);
buildSettings = {
OPTIMIZATION_CFLAGS = "-O0";
Expand Down Expand Up @@ -352,6 +354,74 @@
settings = {
};
};
8750B974046717F40073D10E = {
children = (
8750B975046717F40073D10E,
8750B976046717F40073D10E,
8750B977046717F40073D10E,
8750B978046717F40073D10E,
);
isa = PBXGroup;
path = Fonts;
refType = 4;
};
8750B975046717F40073D10E = {
isa = PBXFileReference;
path = FreeMono.ttf;
refType = 4;
};
8750B976046717F40073D10E = {
isa = PBXFileReference;
path = FreeMonoBold.ttf;
refType = 4;
};
8750B977046717F40073D10E = {
isa = PBXFileReference;
path = FreeMonoBoldOblique.ttf;
refType = 4;
};
8750B978046717F40073D10E = {
isa = PBXFileReference;
path = FreeMonoOblique.ttf;
refType = 4;
};
8750B97D0467185B0073D10E = {
buildActionMask = 2147483647;
dstPath = Fonts;
dstSubfolderSpec = 7;
files = (
8750B98904671BB80073D10E,
8750B98A04671BB80073D10E,
8750B98B04671BB80073D10E,
8750B98C04671BB80073D10E,
);
isa = PBXCopyFilesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
};
8750B98904671BB80073D10E = {
fileRef = 8750B975046717F40073D10E;
isa = PBXBuildFile;
settings = {
};
};
8750B98A04671BB80073D10E = {
fileRef = 8750B976046717F40073D10E;
isa = PBXBuildFile;
settings = {
};
};
8750B98B04671BB80073D10E = {
fileRef = 8750B977046717F40073D10E;
isa = PBXBuildFile;
settings = {
};
};
8750B98C04671BB80073D10E = {
fileRef = 8750B978046717F40073D10E;
isa = PBXBuildFile;
settings = {
};
};
876DBBC1043277AF0073D10E = {
isa = PBXFileReference;
name = zh_CN;
Expand Down
6 changes: 5 additions & 1 deletion zh_CN.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified zh_CN.lproj/MainMenu.nib/objects.nib
Binary file not shown.
3 changes: 2 additions & 1 deletion zh_TW.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified zh_TW.lproj/MainMenu.nib/objects.nib
Binary file not shown.

0 comments on commit 499f961

Please sign in to comment.