NSStringDrawingOptions's doc are not useful

Originator:an00na
Number:rdar://31248663 Date Originated:24-Mar-2017 03:29 PM
Status:Open Resolved:
Product:Documentation Product Version:
Classification:Other Bug Reproducible:
 
For example: https://developer.apple.com/reference/uikit/nsstringdrawingoptions/1534956-useslinefragmentorigin
```
uses​Line​Fragment​Origin
The specified origin is the line fragment origin, not the baseline origin.
```

It's unclear what exactly its effect is.

Meanwhile, NSAttributedString.draw(with:​options:​context:​) documents uses​Line​Fragment​Origin much better https://developer.apple.com/reference/foundation/nsattributedstring/1524971-draw:
```
If uses​Line​Fragment​Origin is specified in options, it wraps the string text as needed to make it fit. If the string is too big to fit completely inside the rectangle, the method scales the font or adjusts the letter spacing to make the string fit within the given bounds.
If uses​Line​Fragment​Origin is not specified in options, the origin of the rectangle is the baseline of the only line. The text will be displayed above the rectangle and not inside of it. For example, if you specify a rectangle starting at 0,0 and draw the string ‘juxtaposed’, only the descenders of the ‘j’ and ‘p’ will be seen. The rest of the text will be on the top edge of the rectangle.
```

Clearly the better documentation should put at uses​Line​Fragment​Origin itself. Otherwise, developers land at uses​Line​Fragment​Origin by other means than NSAttributedString.draw(with:​options:​context:​) couldn't see the meaningful documentation.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!