• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSFont fontWithName: matrix:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFont fontWithName: matrix:


  • Subject: NSFont fontWithName: matrix:
  • From: Steve Sims <email@hidden>
  • Date: Mon, 3 May 2004 12:58:18 -0400

Hi all,

I'm trying to use NSFont fontWithName: matrix: to get a font with different width and height settings but I am seeing some odd results...

The code I'm using is as follows, where width and height are point sizes (floats), and storedFont is a previously selected NSFont object:

float fontMatrix[6];
fontMatrix[0] = width;
fontMatrix[1] = 0.;
fontMatrix[2] = 0.;
fontMatrix[3] = height;
fontMatrix[4] = 0.;
fontMatrix[5] = 0.;
NSFont * font = [NSFont fontWithName: [storedFont fontName]
matrix: fontMatrix];

Now when width=height my output is just fine. However if they're different I seem to get super-massive letters... My guess is that I'm misunderstanding how to do this. Any hints as to what I'm doing wrong?

Thanks in advance,

Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: bug in NSBundle pathForResource:ofType:inDirectory: ?
  • Next by Date: Re: Obj-C in a dylib
  • Previous by thread: Re: Using C++ Windows DLLs in Cocoa/Objective-C app
  • Next by thread: Subclassing NSToolbar is *almost* really good
  • Index(es):
    • Date
    • Thread