Jump to content




Custom Font


7 replies to this topic

#1 gfcwfzkm

  • Members
  • 32 posts

Posted 02 March 2014 - 01:30 AM

Hi, i would like to see if its possible to load "a custom character" to the font of CraftOS (limited to... 16 or 32 Chars).
Something like:
local charTable = {0xE,0x1B,0x11,0x11,0x11,0x11,0x1F} --(5x7 - 'Empty Battery' Char)
os.loadChar(charTable,0x0) -->1: the table with the values for the new Char, 2: the Binary location where the char is located

And then:
print("Battery status: "..os.getChar(0))

=)

mfg

gfc

#2 Alice

  • Members
  • 429 posts
  • LocationBehind you.

Posted 02 March 2014 - 06:27 AM

There's been a lot of bugs with any other fonts, but I'm not sure if it's because HD fonts. They probably wouldn't be adding multiple fonts to the computers.

#3 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 March 2014 - 06:28 AM

I reckon that formatting will happen before custom fonts.

#4 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 02 March 2014 - 08:50 AM

I can see this being useful. However, I'd argue that formatting (as in bold, italic) would be more useful and achieved easier (Minecraft already supports bold and italic characters).

#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 March 2014 - 09:26 AM

While the ability to define characters like that would do no end of good for my nostalgia bone, I for one would be very happy just to see the current character set expanded out to something like this.

 oeed, on 02 March 2014 - 08:50 AM, said:

(Minecraft already supports bold and italic characters)
BIT, what do you mean by "formatting"? This sort of thing, or something else?

I'm not sure if ComputerCraft taps into MineCraft's sign renderer...

Edited by Bomb Bloke, 02 March 2014 - 09:29 AM.


#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 March 2014 - 09:33 AM

 Bomb Bloke, on 02 March 2014 - 09:26 AM, said:

BIT, what do you mean by "formatting"? This sort of thing, or something else?
Yeah bold and italics.

 Bomb Bloke, on 02 March 2014 - 09:26 AM, said:

I'm not sure if ComputerCraft taps into MineCraft's sign renderer...
ComputerCraft does definitely not use Minecraft's font renderer he uses his own. OpenPeripheral Terminal Glasses also use our own. It's stupid and I don't like it, but that's what is done.

Edited by theoriginalbit, 02 March 2014 - 09:34 AM.


#7 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 02 March 2014 - 09:44 AM

Yea, as theoriginalbit said, they don't use it, but it'd make sense to do so. Although there's probably some reason as to why it's not used.

Edited by oeed, 02 March 2014 - 09:44 AM.


#8 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 02 March 2014 - 09:53 AM

 oeed, on 02 March 2014 - 09:44 AM, said:

Yea, as theoriginalbit said, they don't use it, but it'd make sense to do so. Although there's probably some reason as to why it's not used.
as far as I can remember it's so it can be monospaced; i don't think Minecraft's one is.

EDIT: that's ComputerCraft's reason of course. I believe ours was to do with scaling the text.

Edited by theoriginalbit, 02 March 2014 - 09:58 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users