Help with text in MiniConsole

fredrik
Posts: 17
Joined: Sat Apr 10, 2010 9:55 pm

Help with text in MiniConsole

Post by fredrik »

Hello! I'm new to both mudlet and lua, so please bare with me. I've been reading through http://wiki.mudlet.org/w/Manual:Geyser toying around with the provided examples. What I want is my hud/monitor info Hp: 9116(9116) Gp: 4620(4620) locked at the bottom right above input line.

This is what my code looks like:

Pattern: ^Hp: (pearl regex)
Code: [show] | [select all] lua
selectCurrentLine()
copy()
appendBuffer("hudlabel")
deleteLine()
And:
Code: [show] | [select all] lua
setBorderBottom(30)
hudlabel = Geyser.MiniConsole:new({
  name = "hudlabel",
  x = "0", y = "98%",
  width="50%", height="2%",
  fgColor = "black",
  color = "black",
})
Everything is being copied down fine to the MiniConsole, including colours. But somehow the text that's displayed gets a size of probably 8 compared 11 that I use in the main window. I've tried adding various fontsize lines but no luck:( I've used MiniConsole instead of labels since it supposedly handles raw text better, but I'm not sure what I'm doing wrong.

Jor'Mox
Posts: 1154
Joined: Wed Apr 03, 2013 2:19 am

Re: Help with text in MiniConsole

Post by Jor'Mox »

The default font size for a miniconsole is 8. You just need to change it to 11 or whatever you want before sending it text. Use hudlabel.setFontSize(11) or setMiniConsoleFontSize("hudlabel",11).

fredrik
Posts: 17
Joined: Sat Apr 10, 2010 9:55 pm

Re: Help with text in MiniConsole

Post by fredrik »

Worked perfectly, thank you (:

It looks like miniconsole is using a different font then Bitstream Vera Sans Mono that is being used in the main window. It's not a big deal really, but can the font be changed as well?

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with text in MiniConsole

Post by Vadi »

Hm... no, the miniconsoles font cannot be changed, but it does use Bitstream Vera Sans Mono. Try setting it to the same size as the main window, it ought to look the same.

fredrik
Posts: 17
Joined: Sat Apr 10, 2010 9:55 pm

Re: Help with text in MiniConsole

Post by fredrik »

Vadi wrote:Hm... no, the miniconsoles font cannot be changed, but it does use Bitstream Vera Sans Mono. Try setting it to the same size as the main window, it ought to look the same.
I think I found the problem. I have anti-aliasing enabled in my main display. Not sure if it's a bug but the text inside the miniconsole is not affected by this. I have a 27" imac and the text is a lot more smooth to read with anti-aliasing turned on.

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with text in MiniConsole

Post by Vadi »

I haven't noticed AA being off in the miniconsole myself. I'll check it on a mac after. Could you provide a fullscreen screenshot?

fredrik
Posts: 17
Joined: Sat Apr 10, 2010 9:55 pm

Re: Help with text in MiniConsole

Post by fredrik »

Image
Image

First one is with text size 10 in miniconsole, second has size 11.

Text in main display has size 11 with anti-aliasing enabled

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with text in MiniConsole

Post by Vadi »

Which Mac version are you on?

fredrik
Posts: 17
Joined: Sat Apr 10, 2010 9:55 pm

Re: Help with text in MiniConsole

Post by fredrik »

Vadi wrote:Which Mac version are you on?
iMac 27" Intel Core i7 3.4Ghz (Late 2012) Running OS X 10.8.4 and Mudlet 2.1

Text may look a bit blurry in those screenshots, I can provide you a full screen if you wish. But on my screen enabling anti-aliasing makes the text look ALOT better.

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with text in MiniConsole

Post by Vadi »

That's fine, it shows the difference clearly. Thanks!

Post Reply