/arc-text

Javascript Library to curve text on the web

Primary LanguageTypeScriptMIT LicenseMIT

ArcText

Is a Library to curve any text font on the web.

npm version licence Build Status

Installation

$ npm i arc-text --save

In a browser:

<script src="arc-text.js"></script>

Load ES module:

import ArcText from 'arc-text';

API

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