---
title: "CMTextFormatDescriptionGetDefaultTextBox(_:originIsAtTopLeft:heightOfTextTrack:defaultTextBoxOut:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmtextformatdescriptiongetdefaulttextbox(_:originisattopleft:heightoftexttrack:defaulttextboxout:)"
---

# CMTextFormatDescriptionGetDefaultTextBox(_:originIsAtTopLeft:heightOfTextTrack:defaultTextBoxOut:)

Returns the default text box.

## Declaration

```swift
func CMTextFormatDescriptionGetDefaultTextBox(_ desc: CMFormatDescription, originIsAtTopLeft: Bool, heightOfTextTrack: CGFloat, defaultTextBoxOut: UnsafeMutablePointer<CGRect>) -> OSStatus
```

## Parameters

- `desc`: FormatDescription being interrogated.
- `originIsAtTopLeft`: Pass true if the CGRect will be used in an environment where (0,0) is at the top-left corner of an enclosing rectangle and y coordinates increase as you go down. Pass false if the CGRect will be used in an environment where (0,0) is at the bottom-left corner of an enclosing rectangle and y coordinates increase as you go up.
- `heightOfTextTrack`: If originIsAtTopLeft is false, pass the height of the enclosing text track or destination. This value will be used to properly compute the default text box for the given origin. Ignored if originIsAtTopLeft is true.
- `defaultTextBoxOut`: On output, receives the default text box.

## Return Value

Return Value A result code. Returns noErr if successful.

## Discussion

Discussion Within a text track, text is rendered within a text box.  There is a default text box set, which can be over-ridden by a sample.

## See Also

### Working with Text Descriptions

- [CMTextDescriptionFlavor](coremedia/cmtextdescriptionflavor.md)
- [CMTextFormatDescriptionGetDefaultStyle(_:localFontIDOut:boldOut:italicOut:underlineOut:fontSizeOut:colorComponentsOut:)](coremedia/cmtextformatdescriptiongetdefaultstyle(_:localfontidout:boldout:italicout:underlineout:fontsizeout:colorcomponentsout:).md)
- [CMTextFormatDescriptionGetDisplayFlags(_:displayFlagsOut:)](coremedia/cmtextformatdescriptiongetdisplayflags(_:displayflagsout:).md)
- [CMTextFormatDescriptionGetFontName(_:localFontID:fontNameOut:)](coremedia/cmtextformatdescriptiongetfontname(_:localfontid:fontnameout:).md)
- [CMTextFormatDescriptionGetJustification(_:horizontalOut:verticalOut:)](coremedia/cmtextformatdescriptiongetjustification(_:horizontalout:verticalout:).md)
- [CMTextFormatDescriptionCopyAsBigEndianTextDescriptionBlockBuffer(allocator:textFormatDescription:flavor:blockBufferOut:)](coremedia/cmtextformatdescriptioncopyasbigendiantextdescriptionblockbuffer(allocator:textformatdescription:flavor:blockbufferout:).md)
- [CMTextFormatDescriptionCreateFromBigEndianTextDescriptionBlockBuffer(allocator:bigEndianTextDescriptionBlockBuffer:flavor:mediaType:formatDescriptionOut:)](coremedia/cmtextformatdescriptioncreatefrombigendiantextdescriptionblockbuffer(allocator:bigendiantextdescriptionblockbuffer:flavor:mediatype:formatdescriptionout:).md)
- [CMTextFormatDescriptionCreateFromBigEndianTextDescriptionData(allocator:bigEndianTextDescriptionData:size:flavor:mediaType:formatDescriptionOut:)](coremedia/cmtextformatdescriptioncreatefrombigendiantextdescriptiondata(allocator:bigendiantextdescriptiondata:size:flavor:mediatype:formatdescriptionout:).md)
- [CMSwapBigEndianTextDescriptionToHost(_:_:)](coremedia/cmswapbigendiantextdescriptiontohost(_:_:).md)
- [CMSwapHostEndianTextDescriptionToBig(_:_:)](coremedia/cmswaphostendiantextdescriptiontobig(_:_:).md)
