Page 1 of 2
Help with text in MiniConsole
Posted: Mon Jul 29, 2013 12:07 pm
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)
selectCurrentLine()
copy()
appendBuffer("hudlabel")
deleteLine()
And:
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.
Re: Help with text in MiniConsole
Posted: Mon Jul 29, 2013 2:29 pm
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).
Re: Help with text in MiniConsole
Posted: Mon Jul 29, 2013 4:22 pm
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?
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 8:38 am
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.
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 10:28 am
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.
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 10:34 am
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?
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 10:44 am
by fredrik
First one is with text size 10 in miniconsole, second has size 11.
Text in main display has size 11 with anti-aliasing enabled
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 11:15 am
by Vadi
Which Mac version are you on?
Re: Help with text in MiniConsole
Posted: Tue Jul 30, 2013 12:02 pm
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.
Re: Help with text in MiniConsole
Posted: Wed Jul 31, 2013 8:27 am
by Vadi
That's fine, it shows the difference clearly. Thanks!