# scale-text

> Scales text to the size (width and height) of the enclosing container

Latest version **0.2.2** (published 2014-12-01) · Eclipse Public License license · 0 weekly downloads

## Install

```sh
npm install scale-text
pnpm add scale-text
yarn add scale-text
bun add scale-text
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2014-12-01 |
| First published | 2014-11-30 |
| Weekly downloads | 0 |
| License | Eclipse Public License |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Build Canaries |
| Maintainers | joejag |

## Links

- npm: https://www.npmjs.com/package/scale-text
- Repository: https://github.com/build-canaries/scale-text
- Issues: https://github.com/build-canaries/scale-text/issues
- npm.io page: https://npm.io/package/scale-text

## Recent versions

- 0.2.2 (latest) — 2014-12-01
- 0.2.0 — 2014-11-30

## README

Scale Text
==========

A small library that scales text to the size (width and height) of the enclosing container, making the longest word take up a whole ine.

Currently it assumes that you use a monospaced font 13px in height, 6px in width, when judged at font-size 10px.

## Installation

```
  npm install scale-text --save
```

## Usage

```
  var ScaleText = require('scale-text')
  var idealSize = new ScaleText(['word word word'], 20, 100).ideal()

  console.log('ideal font size is ', idealSize);
```

## Tests

```
  npm test
```

## Contributing

If you would like to add a feature/fix a bug for us please create a pull request.

---
_Source: https://npm.io/package/scale-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
