text-fonts-api
v1.0.7
Published
A api to make text with canvas and your favorite fonts, you only need to use the especific class
Downloads
33
Maintainers
Readme
TextFontsApi
A api to make text with canvas and your favorite fonts, you only need to use the especific class
Table Of Content
- How To Use
- ApexFont
- EnchantingTableFont
- FortniteFont
- GeometryDashFont
- GoogleFont
- MinecraftFont
- Discord.js Examples
How To Use
//First you need to do is require the module
const tfa = require('text-fonts-api')
ApexFont
const tfa = require('text-fonts-api')
let img = new tfa.apexFont(`Your text here`)
console.log(img)
/*
{
buffer: <A buffer>
}
*/
EnchantingTableFont
const tfa = require('text-fonts-api')
let img = new tfa.enchantingFont(`Your text here`)
console.log(img)
/*
{
buffer: <A buffer>
}
*/
FortniteFont
const tfa = require('text-fonts-api')
let img = new tfa.fortniteFont(`Your text here`)
console.log(img)
/*
{
url: 'http://fortnitefontgenerator.com/img.php?fontsize=38&textcolor=ffffff&text=Your+text+here'
buffer: <A buffer of the URL>
}
*/
GeometryDashFont
const tfa = require('text-fonts-api')
let img = new tfa.geometryFont(`Your text here`)
geometryFont#goldFont()
const tfa = require('text-fonts-api')
let img = new tfa.geometryFont(`Your text here`).goldFont()
console.log(img)
/*
'https://gdcolon.com/tools/gdfont/img/Your%20text%20here?font=gold'
*/
geometryFont#normalFont()
const tfa = require('text-fonts-api')
let img = new tfa.geometryFont(`Your text here`).normalFont()
console.log(img)
/*
'https://gdcolon.com/tools/gdfont/img/Your%20text%20here?font=1&color=ffffff'
*/
geometryFont#logoFont()
const tfa = require('text-fonts-api')
let img = new tfa.geometryFont(`Your text here`).logoFont()
console.log(img)
/*
'https://gdcolon.com/tools/gdlogo/img/Your%20text%20here'
*/
GoogleFont
const tfa = require('text-fonts-api')
let img = new tfa.googleFont(`Your text here`)
console.log(img)
/*
{
buffer: <A buffer>
}
*/
MinecraftFont
const tfa = require('text-fonts-api')
let img = new tfa.minecraftFont(`Your text here`)
console.log(img)
/*
{
buffer: <A buffer>
}
*/
Discord.js Examples
This is maked with the module discord.js
const { MessageAttachment } = require('discord.js')
const tfa = require('text-fonts-api')
client.on('message', msg => {
let img = new tfa.minecraftFont(`Your text here`)
let attachment = new MessageAttachment(img.buffer, 'minecraft.png')
msg.channel.send(attachment)
})
const { MessageAttachment } = require('discord.js')
const tfa = require('text-fonts-api')
client.on('message', msg => {
let img = new tfa.fortniteFont(`Your text here`)
let attachment = new MessageAttachment(img.url, 'fortnite.png')
msg.channel.send(attachment)
})
const { MessageAttachment } = require('discord.js')
const tfa = require('text-fonts-api')
client.on('message', msg => {
let img = new tfa.geometryFont(`Your text here`).goldFont()
let attachment = new MessageAttachment(img, 'goldgeometry.png')
msg.channel.send(attachment)
})