Skip to content

devnoot/doomtext

 
 

Repository files navigation

DooMTexT

Generate DooM style text in node.js

Installation

npm i doomtext

Usage

The doomtext package exposes a class, DooMTexT, which itself exposes the static method, generate.

You will need to pass a font name, and the text you want to create to DooMTexT.generate()

The font you pass to the the generate method MUST by one of the fonts in font list below.

Sample Code

import { DooMTexT } from 'doomtext'
import { writeFileSync } from 'fs'

// Set the font. It must be a font from the font list.
const font = "ZD2012"
const myText = "Rip and tear. Until it is done!"

// create the image, you can also use DoomText.generate()
// this will return an image buffer
const myDoomText = DooMTexT.generate(font, myText)

// save the file
writeFileSync(myText + '.png', myDoomText)

Font list

04FONTOK

04FONTOK

APOS_BOK

APOS_BOK

DOOM93_2

DOOM93_2

GRGW_LBO

GRGW_LBO

JENOBIG

JENOBIG

MINECSL2

MINECSL2

Q2SMFONK

Q2SMFONK

STAT_LWR

STAT_LWR

STATBLWS

STATBLWS

TORMENTK

TORMENTK

ZD2012

ZD2012

About

Generate doomtext in node

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 87.4%
  • JavaScript 12.6%