fontstyles

1.0.5 • Public • Published

Fonstyles

NPM

Fontstyles is a lightweight npm package that allows you to style your text with various font styles. Easily apply different styles to your text, making it bold, italic, thin, or any other style you desire.


Installation

Install the package using npm:

npm install fontstyles

Usage

Import the fontstyles module and use the available functions to style your text.


Example Usage:

Thin Fontstyle
const text = require('fontstyles');

// Apply thin style to the text
console.log(text.thin("The quick brown fox jumps over the lazy dog"));

// Result:
// 𝖳𝗁𝖾 𝗊𝗎𝗂𝖼𝗄 𝖻𝗋𝗈𝗐𝗇 𝖿𝗈𝗑 𝗃𝗎𝗆𝗉𝗌 𝗈𝗏𝖾𝗋 𝗍𝗁𝖾 𝗅𝖺𝗓𝗒 𝖽𝗈𝗀

Bold Fontstyle
const text = require('fontstyles');

// Apply bold style to the text
console.log(text.bold("The quick brown fox jumps over the lazy dog"));

// Result:
// 𝗧𝗵𝗲 𝗾𝘂𝗶𝗰𝗸 𝗯𝗿𝗼𝘄𝗻 𝗳𝗼𝘅 𝗷𝘂𝗺𝗽𝘀 𝗼𝘃𝗲𝗿 𝘁𝗵𝗲 𝗹𝗮𝘇𝘆 𝗱𝗼𝗴

Roman Fontstyle
const text = require('fontstyles');

// Apply roman style to the text
console.log(text.roman("The quick brown fox jumps over the lazy dog"));

// Result:
// 𝑇𝒉𝒆 𝒒𝒖𝒊𝒄𝒌 𝒃𝒓𝒐𝒘𝒏 𝒇𝒐𝒙 𝒋𝒖𝒎𝒑𝒔 𝒐𝒗𝒆𝒓 𝒕𝒉𝒆 𝒍𝒂𝒛𝒚 𝒅𝒐𝒈

Underline Fontstyle
const text = require('fontstyles');

// Apply underline style to the text
console.log(text.underline("The quick brown fox jumps over the lazy dog"));

// Result:
// T̲h̲e̲ q̲u̲i̲c̲k̲ b̲r̲o̲w̲n̲ f̲o̲x̲ j̲u̲m̲p̲s̲ o̲v̲e̲r̲ t̲h̲e̲ l̲a̲z̲y̲ d̲o̲g̲

Monospace Fontstyle
const text = require('fontstyles');

// Apply monospace style to the text
console.log(text.monospace("The quick brown fox jumps over the lazy dog"));

// Result:
// 𝚃𝚑𝚎 𝚚𝚞𝚒𝚌𝚔 𝚋𝚛𝚘𝚠𝚗 𝚏𝚘𝚡 𝚓𝚞𝚖𝚙𝚜 𝚘𝚟𝚎𝚛 𝚝𝚑𝚎 𝚕𝚊𝚣𝚢 𝚍𝚘𝚐

Available Styles

FontStyles provides several styles that you can apply to your text:

  • thin(text): Makes the text thin.
  • bold(text): Makes the text bold.
  • italic(text): Makes the text italic.
  • underline(text): Underlines the text.
  • strike(text): Strikes through text.
  • monospace(text): A cool font similar to typewriter-style.
  • roman(text): A curvy bold text style.
  • bubble(text): Ⓗⓔⓛⓛⓞ Ⓦⓞⓡⓛⓓ.
  • italicBold(text): Same with italic but much bolder.
  • squarebox(text): 🅃🄷🄸🅂 🅆🄾🅁🄻🄳 🄸🅂 🄾🄽 🄵🄸🅁🄴!

Original Style

  • origin(text): Turn fonts back to the original.

How to use origin(text)?

Here's how we use it:
const text = require('fontstyles');

// This function turns font styles back to its original font.
console.log(text.origin("T̲h̲e̲ q̲u̲i̲c̲k̲ 𝑏𝑟𝑜𝑤𝑛 𝑓𝑜𝑥 𝚓𝚞𝚖𝚙𝚜 𝚘𝚟𝚎𝚛 𝘵𝘩𝘦 𝗹𝗮𝘇𝘆 𝖽𝗈𝗀"));

// Result:
// The quick brown fox jumps over the lazy dog

Feel free to combine these styles to create unique text fonts according to your needs.

Package Sidebar

Install

npm i fontstyles

Weekly Downloads

8

Version

1.0.5

License

ISC

Unpacked Size

2.91 MB

Total Files

17

Last publish

Collaborators

  • y4nd3v