---
title: "CTParagraphStyleGetValueForSpecifier(_:_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctparagraphstylegetvalueforspecifier(_:_:_:_:)"
---

# CTParagraphStyleGetValueForSpecifier(_:_:_:_:)

Obtains the current value for a single setting specifier.

## Declaration

```swift
func CTParagraphStyleGetValueForSpecifier(_ paragraphStyle: CTParagraphStyle, _ spec: CTParagraphStyleSpecifier, _ valueBufferSize: Int, _ valueBuffer: UnsafeMutableRawPointer) -> Bool
```

## Parameters

- `paragraphStyle`: The paragraph style from which to get the value. This parameter may not be NULL.
- `spec`: The setting specifier for which to get the value.
- `valueBufferSize`: The size of the buffer pointed to by the valueBuffer parameter. This value must be at least as large as the size the required by the doc://com.apple.coretext/documentation/CoreText/CTParagraphStyleSpecifier value set in the spec parameter.
- `valueBuffer`: On output, the requested setting value. The buffer’s size needs to be at least as large as the value passed into valueBufferSize. This parameter is required and may not be NULL.

## Return Value

Return Value True if valueBuffer was successfully filled; otherwise, False, indicating that one or more of the parameters are not valid.

## Discussion

Discussion This function returns the current value of the specifier whether or not the user actually set it. If the user did not set the specifier, this function returns the default value. If an invalid paragraph style setting specifier is passed into the spec parameter, nothing bad happens, and the buffer value is simply zeroed out. The reason is to allow backward compatibility with style setting specifiers that may be introduced in future versions.
