This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
reagain111's profile picture

how to change text size?

Started by reagain111, 21 June 2014 - 04:11 AM
reagain111 #1
Posted 21 June 2014 - 06:11 AM
how do you change text scale more than 5.Because i have a reallt big monitor and need bigger words.
Lyqyd #2
Posted 21 June 2014 - 06:17 AM
You'd have to use multiple characters to create images of larger letters.
reagain111 #3
Posted 21 June 2014 - 06:24 AM
And how do you do that?(Sorry, noob)
Bomb Bloke #4
Posted 21 June 2014 - 06:39 AM
local bigChars = {["E"] = {{1,1,1},{1,0,0},{1,1,1},{1,0,0},{1,1,1}},
	["H"] = {{1,0,1},{1,0,1},{1,1,1},{1,0,1},{1,0,1}},
	["I"] = {{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0}},
	["K"] = {{1,0,1},{1,0,1},{1,1,0},{1,0,1},{1,0,1}},
	["L"] = {{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,1,1}},
	["S"] = {{1,1,1},{1,0,0},{1,1,1},{0,0,1},{1,1,1}},
	["T"] = {{1,1,1},{0,1,0},{0,1,0},{0,1,0},{0,1,0}},
	[" "] = {{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}}}
	
local function drawChar(character)
	local xPos, yPos = term.getCursorPos()
	
	for y = 1, 5 do
		term.setCursorPos(xPos, y)
		for x = 1, 3 do
			term.setBackgroundColor(bigChars[character][y][x] == 1 and colours.white or colours.black)
			term.write(" ")
		end
	end
	
	term.setCursorPos(xPos + 4, yPos)
end

local function bigWrite(text)
	for i = 1, #text do
		drawChar(text:sub(i,i))
	end
end

term.clear()
term.setCursorPos(1,1)

bigWrite("LIKE THIS")
Konlab #5
Posted 21 June 2014 - 08:40 AM
I put this in spoiler, because this will long.
Spoiler

A:
 A
A A
AAA
A A
A A
B:
BB
B B
BB
B B
BB
C:
 CC
C
C
C
 CC
D:
DD
D D
D D
D D
DD

Etc.

Edit: Fixed spoiler
Edited on 21 June 2014 - 06:42 AM
reagain111 #6
Posted 21 June 2014 - 09:39 AM
oh, hmm i see