# Shrink to Fit

## Content

The shrink to fit feature attempts to display all the text in the cell. The font size is reduced if the text is too long for the visible area of the cell.

The difference between a cell that supports shrink to fit and a cell that does not can be observed in the image below.

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/shrink.png)

Cell B2 supports the shrink to fit option. Cell B3 sets the [shrinkToFit](/spreadjs/api/v17/classes/GC.Spread.Sheets.CellRange#shrinkToFit) method to false.

The following code sample shows how to set the **shrinkToFit** method.

```javascript
activeSheet.getCell(1,1).shrinkToFit(true);
activeSheet.getCell(1,1).text("Shrink To Fit Test");
activeSheet.getCell(2,1).shrinkToFit(false);
activeSheet.getCell(2,1).text("Shrink To Fit Test");
```