Skip to content
Snippets Groups Projects
Commit d1de6f45 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

tdfonts_lib.js output() method can be passed just the font path/filename

... so the caller (e.g. tdfiglet.js) doesn't need to call loadfont().
parent 84647413
No related branches found
No related tags found
No related merge requests found
...@@ -365,6 +365,9 @@ function printrow(glyph, row) { ...@@ -365,6 +365,9 @@ function printrow(glyph, row) {
} }
function output(str, font) { function output(str, font) {
if (typeof font == "string")
font = loadfont(font);
var maxheight = font.height; // Use the pre-calculated max height from loadfont var maxheight = font.height; // Use the pre-calculated max height from loadfont
var linewidth = 0; var linewidth = 0;
var len = str.length; var len = str.length;
......
...@@ -138,8 +138,6 @@ if (!fontfile && opt.random) { ...@@ -138,8 +138,6 @@ if (!fontfile && opt.random) {
if (!fontfile) if (!fontfile)
usage(); usage();
var font = loadfont(fontfile);
writeln(""); writeln("");
printstr(input_string, font); printstr(input_string, fontfile);
InactivityDays= 15
Delete1XP= true
CleanMode= false
DeedsToWin= 3
BankTransfersAllowed= true
BankTransfersPerDay= 2
MaxTransferAmount= 2000000
PlayerFightsPerDay= 3
ForestFightsPerDay= 15
ResurrectionDays= 3
OutOfTimeFile=
SafeNode= true
UseFancyMore= true
NoNPCChatter= false
Olivia= true
FunkyFlowers= true
ShopLimit= true
FiveSkillPoints= false
BonusDefForPlayerKill= false
BonusStrForPlayerKill= false
GamePrefix=
;GameServer= nix.synchro.net.57038
GameUser= QWKID
GamePassword= QWKPASS
MenuDir=
BeefUpForHeroes= false
OldStealAmounts= true
WakeUpDragon= true
DeathKnightBoost= false
NewUglyStick= false
[Tournament]
Enabled= false
Days= 0
WinStat= XP
Experience= 0
DragonKills= 0
PlayerKills= 0
Level= 0
Lays= 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment