@altano/textfit
v0.0.4
Published
A fast, jQuery-free text sizing component that quickly fits single and multi-line text to the width (and optionally height) of its container.
Downloads
19
Readme
@altano/textfit
- Hassle-Free Text Fitting
A fork of STRML/textFit (@7a1eed6db54a97798556eed3c57b2ce1f87dbab4). Has the following changes:
- Convert to ESM module
- Remove .min.js file
- Convert to TypeScript (with small code changes to accommodate)
- Make inputs stricter
- Adds the following settings to the defaults:
settings = { ... /** * Sets the final size to the max multiple of this. Useful when a font * requires the font size to be a multiple of a number for optimal rendering. */ sizeMultipleOf: 1, };
- Remove the following settings (to simplify the code):
alignHoriz
alignVert