setFont broken in 0.8.7?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
BonneCW
Just popping in
Just popping in
Posts: 8
Joined: Sun Sep 25, 2016 21:49

setFont broken in 0.8.7?

Postby BonneCW » Sun Sep 25, 2016 22:14

Hey there,

I'm working on a game engine based on Ogre and CEGUI for the graphics backend. I updated some time ago from CEGUI 0.8.4 to 0.8.7 and now using setFont doesn't have any effect anymore. Just setting the default font (CEGUI::System::getSingleton().getDefaultGUIContext().setDefaultFont(fontName)) takes effect, but of course I want to be able to set a specific font for widgets. Is anything known about this issue? Is there some other a workaround than going back to 0.8.4? Maybe the issue is caused by ticket #1087?

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Mon Sep 26, 2016 04:44

@BonneCW: Hi,

What type of widget?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: setFont broken in 0.8.7?

Postby Ident » Mon Sep 26, 2016 06:07

Could you give us a minimal code snippet that safely reproduces the issue?

Even easier: If you can point out the issue anywhere in the samples browser's samples then point me to it, then I will fix the bug immediately.

Additionally, I want to say that the issue you linked me to was definitely visible in the SampleBrowser and I fixed it there without noticing any other changes and we definitely do set fonts for widgets there. So I am surprised to have missed this issue.

User avatar
BonneCW
Just popping in
Just popping in
Posts: 8
Joined: Sun Sep 25, 2016 21:49

Re: setFont broken in 0.8.7?

Postby BonneCW » Mon Sep 26, 2016 07:02

YaronCT wrote:@BonneCW: Hi,

What type of widget?


It is a CEGUI::Listbox.

Ident wrote:Could you give us a minimal code snippet that safely reproduces the issue?

Even easier: If you can point out the issue anywhere in the samples browser's samples then point me to it, then I will fix the bug immediately.

Additionally, I want to say that the issue you linked me to was definitely visible in the SampleBrowser and I fixed it there without noticing any other changes and we definitely do set fonts for widgets there. So I am surprised to have missed this issue.


I'll take a look on the samples, maybe I can reproduce the bug there. Otherwise I'll try to create a small sample with the bug. I don't think there is a basic configuration failure on my side as this feature worked for 2 or 3 years with different CEGUI versions and it also works again by just changing back to 0.8.4.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Tue Sep 27, 2016 19:28

@BonneCW: No need, I've reproduced it and test it.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Tue Sep 27, 2016 19:30

@BonneCW, @Ident: Seems like the bug is only in lists. I had noticed it b4 but just assumed it wasn't supposed to work, didn't know it was a regression..

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Tue Sep 27, 2016 19:31

That is, work with different fonts per list item.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Wed Sep 28, 2016 05:51

@Ident: Your commit "4f90ed9e1c70" has caused this. If I try to undo the commit setting a list item font works again, but the sample framework doesn't. Do u by chance remember the reason for that commit?

User avatar
BonneCW
Just popping in
Just popping in
Posts: 8
Joined: Sun Sep 25, 2016 21:49

Re: setFont broken in 0.8.7?

Postby BonneCW » Wed Sep 28, 2016 06:30

YaronCT wrote:@BonneCW: No need, I've reproduced it and test it.


Thanks. Good that you could reproduce it that fast.

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Wed Sep 28, 2016 08:29

@Ident: actually my mistake, the sample framework does work when reverting your commit. Is it possible u were on drugs when u made that commit?

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: setFont broken in 0.8.7?

Postby YaronCT » Wed Sep 28, 2016 20:20

@BonneCW: In the meantime, u can reverse the commit yourself: Install Mercurial, then:

Code: Select all

hg clo -u v0-8 https://bitbucket.org/cegui/cegui cegui
cd cegui
hg diff -r 4f90ed9e1c70^ -r 4f90ed9e1c70 --reverse | hg patch --no-commit -

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: setFont broken in 0.8.7?

Postby Ident » Wed Sep 28, 2016 22:12

Yes, the drags made me do it!

On a more serious note: I remember this change and there was a reason I did this. I don't remember the effect that removing it has but you should look very closely at the SampleBrowser especially in the look n feel sample to see if or what effect it has. Pretty sure there was something wrong. Also pretty sure that this tore open the bug you see. The solution has to be to fix both.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests