README
ArcText
Is a Library to curve any text font on the web.
Installation
$ npm i arc-text --save
In a browser:
<script src="arc-text.js"></script>
Load ES module:
import ArcText from 'arc-text';
API
- ArcText
- new ArcText(elem, [splitter])
- .arc(value) ⇒
ArcText - .arc() ⇒
number - .direction(value) ⇒
ArcText - .direction() ⇒
number - .forceWidth(value) ⇒
ArcText - .forceWidth() ⇒
boolean - .forceHeight(value) ⇒
ArcText - .forceHeight() ⇒
boolean - .refresh() ⇒
ArcText - .destroy() ⇒
ArcText
Examples
Arc-text radius
const arcText = new ArctText(document.getElementById('myElement'));
// Set the radius to 150 pixels.
arcText.arc(150);
Arc-text get radius
const arcText = new ArctText(document.getElementById('myElement'));
// get the radius to 150 pixels.
arcText.arc();
Arc-text direction
const arcText = new ArctText(document.getElementById('myElement'));
// Set the direction to counter-clockwise.
arcText.direction(-1);
// Set the direction to clockwise.
arcText.direction(1);
// get the direction.
arcText.direction();
Inspired
this library is inspired in CircleType
Author
Alex Marcos Gutierrez
License
MI