Minor fixes and project upgrade for fonttexgen.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4756 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
5377668ea8
commit
17a9500c4a
5070
tools/fonttexgen/English.lproj/MainMenu.nib/designable.nib
generated
5070
tools/fonttexgen/English.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -128,14 +128,18 @@ static inline NSRect ScaleRect(NSRect rect, NSPoint scale)
|
||||
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
// Disable subpixel anti-aliasing.
|
||||
CGContextRef cgCtxt = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextSaveGState(cgCtxt);
|
||||
CGContextSetShouldSmoothFonts(cgCtxt, NO);
|
||||
|
||||
[[NSColor blackColor] set];
|
||||
[NSBezierPath fillRect:rect];
|
||||
|
||||
// Originally hard-coded at 512x512 pixels, scale is used to transform magic numbers as appropriate.
|
||||
NSPoint scale = { self.bounds.size.width / 512, self.bounds.size.height / 512 };
|
||||
|
||||
// NSFont *font = [NSFont fontWithName:@"Helvetica Bold" size:25.0 * scale.y];
|
||||
NSFont *font = [NSFont fontWithName:@"Play-Bold" size:25.0 * scale.y];
|
||||
NSFont *font = [NSFont fontWithName:@"Helvetica Bold" size:25.0 * scale.y];
|
||||
if (font == nil) NSLog(@"Failed to find font!");
|
||||
NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName, nil];
|
||||
|
||||
@ -190,20 +194,24 @@ static inline NSRect ScaleRect(NSRect rect, NSPoint scale)
|
||||
[_topRows drawInRect:dstRect fromRect:srcRect operation:NSCompositePlusLighter fraction:1.0];
|
||||
|
||||
_widths = [widths copy];
|
||||
|
||||
CGContextRestoreGState(cgCtxt);
|
||||
}
|
||||
|
||||
|
||||
- (IBAction) saveImage:(id)sender
|
||||
{
|
||||
NSSavePanel *savePanel = [NSSavePanel savePanel];
|
||||
[savePanel setRequiredFileType:(NSString *)kUTTypeTIFF];
|
||||
[savePanel setAllowedFileTypes:[NSArray arrayWithObject:(NSString *)kUTTypeTIFF]];
|
||||
[savePanel setCanSelectHiddenExtension:YES];
|
||||
[savePanel setExtensionHidden:NO];
|
||||
if ([savePanel runModalForDirectory:nil file:@"oolite-font.tiff"] == NSOKButton)
|
||||
[savePanel setNameFieldStringValue:@"oolite-font.tiff"];
|
||||
|
||||
if ([savePanel runModal] == NSOKButton)
|
||||
{
|
||||
NSBitmapImageRep *rep = [self bitmapImageRepForCachingDisplayInRect:self.bounds];
|
||||
[self cacheDisplayInRect:self.bounds toBitmapImageRep:rep];
|
||||
NSString *path = [savePanel filename];
|
||||
NSString *path = [[savePanel URL] path];
|
||||
[[rep TIFFRepresentation] writeToFile:path atomically:YES];
|
||||
|
||||
NSMutableDictionary *plist = [_template mutableCopy];
|
||||
|
@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 44;
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@ -157,8 +157,11 @@
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0420;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "fonttexgen" */;
|
||||
compatibilityVersion = "Xcode 3.0";
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
@ -227,12 +230,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk/System/Library/Frameworks\"",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
@ -251,10 +249,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk/System/Library/Frameworks\"",
|
||||
);
|
||||
GCC_ENABLE_OBJC_GC = required;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
@ -271,22 +265,14 @@
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -12,6 +12,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
@try
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObject:[NSNumber numberWithInteger:1] forKey:@"AppleFontSmoothing"]];
|
||||
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
||||
@catch (id e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user