##### Views

- Page
- Discussion
- View source
- History

# Font:getWrap

Available since LÖVE 0.7.0
This function is not supported in earlier versions.

Returns how many lines text would be wrapped to. This function accounts for newlines correctly (i.e. '\n')

## Function

### Synopsis

width, lines = Font:getWrap(text, width)

### Arguments

`string text`
  The text that would be wrapped.
`number width`
  The width to which text should be wrapped.

### Returns

`number width`
  The actual width the wrapped text.
`number lines`
  The number of lines text was wrapped to.

## See Also

- Font

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/Font:getWrap"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties