June 10th, 2010
Chad Fuller posted a list of fonts installed with iPhone OS 2.2.1. I needed to see a more updated list for iPhone OS 3.1.
Deriving from his code, I used the following snippet to output a list of installed fonts to the console.
for (NSString *family in [UIFont familyNames] ) {
NSLog(@"Family: %@", family);
NSLog(@"Fonts:\n");
for (NSString *name in [UIFont fontNamesForFamilyName: family]) {
NSLog(@"\t%@", name);
}
NSLog(@"\n");
}
Here’s the list of fonts reported for iPhone OS 3.1.3.
Family: AppleGothic
Fonts:
AppleGothic
Family: Hiragino Kaku Gothic ProN
Fonts:
HiraKakuProN-W6
HiraKakuProN-W3
Family: Arial Unicode MS
Fonts:
ArialUnicodeMS
Family: Heiti K
Fonts:
STHeitiK-Medium
STHeitiK-Light
Family: DB LCD Temp
Fonts:
DBLCDTempBlack
Family: Helvetica
Fonts:
Helvetica-Oblique
Helvetica-BoldOblique
Helvetica
Helvetica-Bold
Family: Marker Felt
Fonts:
MarkerFelt-Thin
Family: Times New Roman
Fonts:
TimesNewRomanPSMT
TimesNewRomanPS-BoldMT
TimesNewRomanPS-BoldItalicMT
TimesNewRomanPS-ItalicMT
Family: Verdana
Fonts:
Verdana-Bold
Verdana-BoldItalic
Verdana
Verdana-Italic
Family: Georgia
Fonts:
Georgia-Bold
Georgia
Georgia-BoldItalic
Georgia-Italic
Family: Arial Rounded MT Bold
Fonts:
ArialRoundedMTBold
Family: Trebuchet MS
Fonts:
TrebuchetMS-Italic
TrebuchetMS
Trebuchet-BoldItalic
TrebuchetMS-Bold
Family: Heiti TC
Fonts:
STHeitiTC-Light
STHeitiTC-Medium
Family: Geeza Pro
Fonts:
GeezaPro-Bold
GeezaPro
Family: Courier
Fonts:
Courier
Courier-BoldOblique
Courier-Oblique
Courier-Bold
Family: Arial
Fonts:
ArialMT
Arial-BoldMT
Arial-BoldItalicMT
Arial-ItalicMT
Family: Heiti J
Fonts:
STHeitiJ-Medium
STHeitiJ-Light
Family: Arial Hebrew
Fonts:
ArialHebrew
ArialHebrew-Bold
Family: Courier New
Fonts:
CourierNewPS-BoldMT
CourierNewPS-ItalicMT
CourierNewPS-BoldItalicMT
CourierNewPSMT
Family: Zapfino
Fonts:
Zapfino
Family: American Typewriter
Fonts:
AmericanTypewriter
AmericanTypewriter-Bold
Family: Heiti SC
Fonts:
STHeitiSC-Medium
STHeitiSC-Light
Family: Helvetica Neue
Fonts:
HelveticaNeue
HelveticaNeue-Bold
Family: Thonburi
Fonts:
Thonburi-Bold
Thonburi
Tags: iphone
Posted in Cocoa | No Comments »
December 3rd, 2009
Just started a collection of Xcode file and project templates on bitbucket.org.
The big feature of the collection is a project template for a document-based Cocoa application with explicit NSWindowControllers. This project illustrates using the Cocoa document architecture to implement an explicitly managed main window and an associated inspector window.
Download a zip archive of the project template here.
Posted in Cocoa, Shiny | No Comments »
September 30th, 2009
Using Automator on Mac OS X 10.6, it’s easy to create a service for the Finder that opens the currently selected folder in Murky.
Download MurkyFinderService.zip
Unzip, copy the .workflow file into your ~/Library/Services folder, and away you go.
Tags: Mercurial, Murky
Posted in Shiny, Utilities | No Comments »
September 30th, 2009
alias murky=’open -b com.mooseyard.Murky $PWD’
You’re in a shell and your current working directory is being tracked by Mercurial. It would handy to have a command to open the repo in Murky. Your wish is my command.
alias murky=’open -b com.mooseyard.Murky $PWD’
Add this line to your .profile and let ‘murky’ do the work, eh.
Tags: Mercurial, Murky
Posted in Shiny, Unix, Utilities | No Comments »
September 29th, 2009
In the spirit of OpenInTerminal and OpenInGitGui, I’ve put together an Automator application that will open the selected Finder folder in Murky. When said folder contains an Hg repository, all manner of good things happen.
Download OpenInMurky.zip
Installation and Use
- Download and unzip OpenInMurky.zip
- Drag OpenInMurky.app to your Finder’s toolbar.
- Navigate to your favorite Hg repository folder.
- Click on the OpenInMurky Finder toolbar item.
- Watch Murky open up your repository.
Tags: Mercurial, Murky
Posted in Shiny, Utilities | No Comments »
August 19th, 2009
I spent some time recently putting together a Cocoa interface to the built-in Apple System Logging (ASL) facility.
Following Peter Hosey’s excellent blog series on ASL and some other tidbits on Cocoa-Dev, I fashioned small and simple Cocoa framework for integrating ASL’s multi-leveled logging into your project.
—
#import <SOLogger/SOLogger.h>
SOLogger *logger;
logger = [SOLogger loggerForFacility: @"com.example.MyApp" options:ASL_OPT_STDERR];
[logger debug:@"A debugging note on: %@", [NSDate date]];
[logger info:@"We just did something."];
[logger notice:@"That's going to leave a mark"];
[logger warning:@"WTF?"];
[logger alert:@"WTF!"];
[logger critical:@"OMG"];
[logger panic:@"OMG WTF!"];
—
An interesting feature of SOLogger (courtesy of ASL) is that you can create separate loggers for subsystems in your code, potentially logging them to separate destinations.
I host the SOLogger project on Bitbucket with a BSD License.
Check it out.
Tags: Cocoa, code
Posted in Cocoa, Shiny, Utilities | No Comments »
March 14th, 2009
I love the sanity that GHUnit brings to running and debugging unit tests. The under-documented Xcode 3 mojo needed to configure SenTest unit test bundles for debugging throws a wet towel on the practice of test-driven Cocoa development.
The current GHUnit distribution runs all unit tests found in your app or framework. I did some work today to enable running a selected test cases and individual unit tests.
This works similarly to the SenTestingKit’s otest tool. You specify a unit test case and/or test name to run as an argument to the GHUnit test application.
In the Xcode’s executable panel for the test application, add arguments of the form:
-Test UserTests
-Test UserTests/testEmptyUserName
-Test All
When you run or debug the test app, only the specified test case or individual test will be executed. The argument -Test All will run all available unit test cases.
The patch file is here and works for Mac OS X. To apply the patch:
$ cd your-GHUnit-project-directory
$ patch -p1 < path-to-patch-file
I’ve submitted the patch to Gabriel, so maybe it’ll make it into a future release.
Tags: Cocoa, UnitTesting
Posted in Cocoa, Unit Testing | No Comments »
August 2nd, 2008
The next Syracuse Area CocoaHeads meeting is coming up. Next Tuesday, August 12.
Posted in CocoaHeads | No Comments »
August 2nd, 2008
[MattGallagher programming:Cocoa with:Love] is one of my new favorite Cocoa blogs. I discovered it through Planet Cocoa, so thanks for that.
Matt writes at a sweet spot of Cocoa geekness style that I find really appealing. He uses code recipes balanced with concise commentary to pack a lot of goodness into a tight blog posting. I want my blog articles to read like his.
Tags: Blogs
Posted in Cocoa | No Comments »
August 2nd, 2008
bithaus blogs about a category on NSImageView to do the reflection effect. A must for modern sexy UI.
See this on cocoadev.
Tags: NSImageView
Posted in Cocoa | No Comments »