---
title: "createPostScriptSubset(subsetName:format:glyphs:count:encoding:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgfont/createpostscriptsubset(subsetname:format:glyphs:count:encoding:)"
---

# createPostScriptSubset(subsetName:format:glyphs:count:encoding:)

Creates a subset of the font in the specified PostScript format.

## Declaration

```swift
func createPostScriptSubset(subsetName: CFString, format: CGFontPostScriptFormat, glyphs: UnsafePointer<CGGlyph>?, count: Int, encoding: UnsafePointer<CGGlyph>?) -> CFData?
```

## Parameters

- `subsetName`: The name of the subset.
- `format`: The PostScript format of the font.
- `glyphs`: An array that contains the glyphs in the subset.
- `count`: The number of glyphs specified by the glyphs array.
- `encoding`: The default encoding for the subset. You can pass nil if you do not want to specify an encoding.

## Return Value

Return Value A subset of the font created from the supplied parameters.

## Discussion

Discussion For more information on PostScript format, see Adobe Type 1 Font Format, which is available from http://partners.adobe.com/.

## See Also

### Working with PostScript Fonts

- [postScriptName](coregraphics/cgfont/postscriptname.md)
- [canCreatePostScriptSubset(_:)](coregraphics/cgfont/cancreatepostscriptsubset(_:).md)
- [CGFontPostScriptFormat](coregraphics/cgfontpostscriptformat.md)
- [createPostScriptEncoding(encoding:)](coregraphics/cgfont/createpostscriptencoding(encoding:).md)
