A Node.js module to convert text into various font styles.
You can install font-style
using npm or yarn:
npm install font-style
or
yarn add font-style
The font-style module provides a function fontStyle(text, font) that takes two parameters:
- text (required): The text you want to transform.
- font (optional): The font style you want to apply. Default is 'black-square'. Here's an example usage:
const fontStyle = require('font-style');
// Transform text with default font style (black-square)
const text1 = 'Hello World';
const result1 = fontStyle(text1);
console.log(result1);
// Transform text with small-caps font style
const text2 = 'Lorem Ipsum';
const result2 = fontStyle(text2, 'small-caps');
console.log(result2);
Output:
🅗🅔🅛🅛🅞 🅦🅞🅡🅛🅓
ʟᴏʀᴇᴍ ɪᴘꜱᴜᴍ
const { getAllFonts } = require('font-style')
console.log('Available fonts:')
console.log(getAllFonts)
Contributions to the font-style module are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.
The font-style module is created and maintained by AliAryanTech.