Type Method

rename(fromName:visibility:toName:)

Renames the font collection with the specified name and visibility to the second name specified.

Declaration

class func rename(fromName name: NSFontCollection.Name, visibility: NSFontCollection.Visibility, toName name: NSFontCollection.Name) throws

Parameters

name

The collection to rename.

visibility

The visibility of the collection to rename.

name

The new name to give to the collection.

error

If unsuccessful, a reference to an NSFileManager error object that encapsulates the reason the font collection could not be renamed.

Return Value

true if the method was successful; false otherwise.

Discussion

Named collections are shown by user interfaces such as the Font panel. When you change the collection, you must show it again to see the changes reflected on disk or in the Font panel.

See Also

Naming Font Collections

class func hide(withName: NSFontCollection.Name, visibility: NSFontCollection.Visibility)

Remove from view the named font collection with the specified visibility.

class var allFontCollectionNames: [NSFontCollection.Name]

Returns all named collections visible to this process.

init?(name: NSFontCollection.Name)

Returns the font collection with the specified name.

struct NSFontCollection.Name

The constants represent the standard mutable collection names—these names are included in the list of allFontCollectionNames--they have special meaning to the Cocoa font system and should not be hidden or renamed.

init?(name: NSFontCollection.Name, visibility: NSFontCollection.Visibility)

Returns the font collection with the specified name and visibility.

struct NSFontCollection.Visibility

Constants that specify the visibility of font collections.