From d1de6f4593bf9dbb6edb4c34b729b4f27a75072b Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Wed, 23 Apr 2025 17:25:32 -0700
Subject: [PATCH] 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().
---
 exec/load/tdfonts_lib.js   |  3 +++
 exec/tdfiglet.js           |  4 +---
 xtrn/lord/lord.example.ini | 40 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)
 create mode 100644 xtrn/lord/lord.example.ini

diff --git a/exec/load/tdfonts_lib.js b/exec/load/tdfonts_lib.js
index c64554bc0c..d1422f12a5 100644
--- a/exec/load/tdfonts_lib.js
+++ b/exec/load/tdfonts_lib.js
@@ -365,6 +365,9 @@ function printrow(glyph, row) {
 }
 
 function output(str, font) {
+	if (typeof font == "string")
+		font = loadfont(font);
+
     var maxheight = font.height; // Use the pre-calculated max height from loadfont
     var linewidth = 0;
     var len = str.length;
diff --git a/exec/tdfiglet.js b/exec/tdfiglet.js
index 379355f2b8..74f95d7f94 100644
--- a/exec/tdfiglet.js
+++ b/exec/tdfiglet.js
@@ -138,8 +138,6 @@ if (!fontfile && opt.random) {
 if (!fontfile)
 	usage();
 
-var font = loadfont(fontfile);
-
 writeln("");
 
-printstr(input_string, font);
+printstr(input_string, fontfile);
diff --git a/xtrn/lord/lord.example.ini b/xtrn/lord/lord.example.ini
new file mode 100644
index 0000000000..21f17bce0d
--- /dev/null
+++ b/xtrn/lord/lord.example.ini
@@ -0,0 +1,40 @@
+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
-- 
GitLab