weird-glyph
v0.0.3
Published
Transform common glyphs to weird glyphs.
Readme
weird-glyph
Install
npm i weird-glyph -Dyarn add weird-glyph -Dpnpm add weird-glyph -DUsage
// config/index.ts
import { weirdGlyph } from 'weird-glyph'
console.log(
weirdGlyph('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', {
category: 'script',
variant: 'regular',
}),
)
// cSpell: disable-next-line
// => 𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹ℯ𝒻ℊ𝒽𝒾𝒿𝓀𝓁𝓂𝓃ℴ𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏API
weirdGlyph
- Type:
(input: string, options: Options) => string
Interface
export type Options = {
category: WeirdGlyphCategory
variant: WeirdGlyphVariant
}
/**
* Weird glyph category
*/
export type WeirdGlyphCategory =
| 'circle'
| 'currency'
| 'double-struck'
| 'fancy'
| 'fraktur'
| 'latin'
| 'monospace'
| 'sans-serif'
| 'script'
| 'serif'
| 'square'
/**
* Weird glyph variant
*/
export type WeirdGlyphVariant =
| 'arrow'
| 'black'
| 'bold-italic'
| 'bold'
| 'cross'
| 'dot'
| 'extended'
| 'fireworks'
| 'happy'
| 'italic'
| 'line'
| 'regular'
| 'sad'
| 'slash'
| 'smallcaps'
| 'tildestrikethrough'
| 'upside'
| 'winding'
| 'xabove'