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

term.setTextStyle(string)

Started by ebernerd, 18 December 2013 - 08:14 PM
ebernerd #1
Posted 18 December 2013 - 09:14 PM
So, Ive always wanted a Bolded or Italicized text area on the CC screen, so here is an example of my idea:


term.setTextStyle("bold") -- could alternitively be term.setTextStyle(style.bold) or sometin like that
write("THIS IS NOW BOLD")
term.setTextStyle("italic")
write("You get the drift")
theoriginalbit #2
Posted 18 December 2013 - 09:16 PM
this along with hi-res computers is the largest asked question. what makes you think that your less intuitive method would be implemented?
ebernerd #3
Posted 18 December 2013 - 09:21 PM
this along with hi-res computers is the largest asked question. what makes you think that your less intuitive method would be implemented?
I had not realized that this had been asked a lot. I am sorry.
awsmazinggenius #4
Posted 19 December 2013 - 11:50 PM
this along with hi-res computers is the largest asked question. what makes you think that your less intuitive method would be implemented?
I had not realized that this had been asked a lot. I am sorry.

Repeated denial does not indicate a bad suggestion. I think this a good suggestion, but we could use term.bold() and term.italic() etc.

Personally I am not a fan of locking all bad suggestions, with some good user discussion a good one can sometimes be formed.
Lyqyd #5
Posted 20 December 2013 - 12:26 AM
The ones that get locked are nearly always because they violate one of the things on the Suggestions Not To Make list.
distantcam #6
Posted 20 December 2013 - 01:36 AM
From a quick searchThe general consensus here is that with the limited pixel size of the characters it's pretty much impossible to make a bold or italic font and have it look good.

<offtopic> Is it worth creating a sticky of frequently asked suggestions so we can point to that whenever one of these suggestions comes up?</offtopic>
theoriginalbit #7
Posted 20 December 2013 - 01:56 AM
<offtopic> Is it worth creating a sticky of frequently asked suggestions so we can point to that whenever one of these suggestions comes up?</offtopic>
oeed #8
Posted 20 December 2013 - 04:16 AM
While I would like this, based on the fact that CC uses the old Minecraft text renderer (I think?) which I don't believe supports this, I could be wrong, however. You can definitely do bold text, italics, etc in Minecraft, so if CC does switch/already is using the renderer which supports this it may not be too hard, but I'm purely guessing here.
theoriginalbit #9
Posted 20 December 2013 - 04:42 AM
While I would like this, based on the fact that CC uses the old Minecraft text renderer (I think?) […] You can definitely do bold text, italics, etc in Minecraft, so if CC does switch/already is using the renderer which supports this it may not be too hard,
it uses its own renderer which performs renders as a (poorly) monospaced font. Switching to the Minecraft font renderer would mean that it would no longer be monospaced (at least based on the last time I read the Minecraft font renderer).
distantcam #10
Posted 20 December 2013 - 05:42 AM
<offtopic> Is it worth creating a sticky of frequently asked suggestions so we can point to that whenever one of these suggestions comes up?</offtopic>

Well then this is not on that list. :P/>
Lyqyd #11
Posted 20 December 2013 - 10:22 AM
The contents of the list were approved by Cloudy. Things can't be added to the list without developer approval.
distantcam #12
Posted 20 December 2013 - 11:38 AM
Yay! Red tape!

So back to my suggestion of a frequently asked suggestions sticky post then?
Lyqyd #13
Posted 20 December 2013 - 12:27 PM
We already have a developer-approved one. We don't need another one when the first one obviously isn't getting read as much as it should.
oeed #14
Posted 20 December 2013 - 02:15 PM
While I would like this, based on the fact that CC uses the old Minecraft text renderer (I think?) […] You can definitely do bold text, italics, etc in Minecraft, so if CC does switch/already is using the renderer which supports this it may not be too hard,
it uses its own renderer which performs renders as a (poorly) monospaced font. Switching to the Minecraft font renderer would mean that it would no longer be monospaced (at least based on the last time I read the Minecraft font renderer).

Oh, really? I thought I'd read on multiple occasions that is used an old Minecraft text renderer. In that case I wouldn't bet on any changes to the text system then.
theoriginalbit #15
Posted 20 December 2013 - 08:54 PM
Oh, really? I thought I'd read on multiple occasions that is used an old Minecraft text renderer. In that case I wouldn't bet on any changes to the text system then.
It is fairly similar to the Minecraft one, and most likely a copy/paste of it too, but then it had to be tweaked to make it monospaced.
awsmazinggenius #16
Posted 20 December 2013 - 10:38 PM
And what is the giant deal about monospacing? It's nice to have, but not necessary.
Monospaced

while true do
  print("Monospaced")
  sleep(1)
end
Not Monospacedwhile true do
__print("Monospaced")
__sleep(1)
end
(Damn editor - won't let me indent code not in a code block)
Edited on 20 December 2013 - 09:40 PM
Lyqyd #17
Posted 20 December 2013 - 10:41 PM
If the screen wasn't monospaced, you couldn't design anything in it.
theoriginalbit #18
Posted 20 December 2013 - 10:50 PM
And what is the giant deal about monospacing? It's nice to have, but not necessary.
Monospaced

while true do
  print("Monospaced")
  sleep(1)
end
Not Monospacedwhile true do
__print("Monospaced")
__sleep(1)
end
You do realise that you just used a monospaced font in your "not monospaced" area!

A better comparison.
Compare the pair — Monospaced
Compare the pair — Sans-serif

The point of monospaced font is that each character gets the same width allocated to it. which is essential for ComputerCraft due to how our pixels are setup.
Edited on 20 December 2013 - 10:35 PM
distantcam #19
Posted 20 December 2013 - 11:15 PM
Monospace: (1)
Non-monospace: (1)

The kerning on the non-monospace looks bad.

Given the way terminals (and monitors) do cursor positioning rather than pixel positioning using a non-monospaced font would mess up that.
oeed #20
Posted 20 December 2013 - 11:35 PM
And what is the giant deal about monospacing? It's nice to have, but not necessary.
Monospaced

while true do
  print("Monospaced")
  sleep(1)
end
Not Monospacedwhile true do
__print("Monospaced")
__sleep(1)
end
(Damn editor - won't let me indent code not in a code block)

Layouts would be almost impossible. Trying to make something using a UI such as PearOS would be all over the place. Trying making a basic table or something in Word, Pages, etc. using a font such as Arial or Helvetica.


In other words, it's essential.
Alice #21
Posted 21 December 2013 - 12:02 AM
DOS is monospaced, is it not?
Correct me if I'm wrong, but ComputerCraft does seem a bit like DOS (For the two days I used it :D/> )
Having monospace is essential for many programs, and it helps with the feel of ComputerCraft.
Also, term.setCursorPos and getCursorPos would be a lot more different and painful.
awsmazinggenius #22
Posted 21 December 2013 - 11:23 AM
And what is the giant deal about monospacing? It's nice to have, but not necessary.
Monospaced

while true do
  print("Monospaced")
  sleep(1)
end
Not Monospacedwhile true do
__print("Monospaced")
__sleep(1)
end
You do realise that you just used a monospaced font in your "not monospaced" area!

A better comparison.
Compare the pair — Monospaced
Compare the pair — Sans-serif

The point of monospaced font is that each character gets the same width allocated to it. which is essential for ComputerCraft due to how our pixels are setup.
Thanks bit. I realized that just now!
I do see the issues now.