On 31 May 2015, at 4:43 pm, Roland King r...@rols.org wrote:
So, TL;DR: how do I find the Font Family name(s) corresponding to an
arbitrary list of NSFontDescriptors from a font collection?
—Graham
just looking at the docs for NSFontDescriptor I would guess
[
So, TL;DR: how do I find the Font Family name(s) corresponding to an
arbitrary list of NSFontDescriptors from a font collection?
—Graham
just looking at the docs for NSFontDescriptor I would guess
[ fontDescriptor objectForKey:NSFontFamilyAttribute ]
A quick test (in Swift no less) suggests to me that this function just doesn’t
work (TM).
I get non-zero results for these 13 flag combinations (count of fonts + mask)
and zero results for every other one of the 4096 combinations.
141 NSItalicFontMask
259 NSBoldFontMask
61
On 31 May 2015, at 1:44 pm, Kyle Sluder k...@ksluder.com wrote:
Here, you're asking for all fonts that consider themselves to be both
bold and unbold. This set is going to be empty (unless you have a
particularly broken font installed).
Yeah, I just realised that though of course you’re
I’m using -[NSFontManager availableFontNamesWithTraits:] and I want to get the
names of all of the fonts that have both a regular (plain) and bold option.
I’ve tried various things, but this seems like it should work:
NSArray* fonts = [[NSFontManager sharedFontManager]
On Sat, May 30, 2015, at 09:42 PM, Graham Cox wrote:
I’m using -[NSFontManager availableFontNamesWithTraits:] and I want to
get the names of all of the fonts that have both a regular (plain) and
bold option.
I’ve tried various things, but this seems like it should work:
NSArray*
On 31 May 2015, at 1:44 pm, Kyle Sluder k...@ksluder.com wrote:
you're much better
off using NSFontDescriptor.
So here’s what I’m trying to do. I have a “simple” UI that, among many other
things, allows the user to choose a font for various things in a display. I
want to keep the set of