font size bug on Conwaylife.com

Has something gone haywire? Let us know about it!
Post Reply
User avatar
Scorbie
Posts: 1692
Joined: December 7th, 2013, 1:05 am

font size bug on Conwaylife.com

Post by Scorbie » May 12th, 2015, 4:20 am

I'm not sure if others also have this bug. When I click the 'Change font size' button on the top right corner of the page, (that looks like vA^)
the font does get smaller, but I cannot make the font return to its original size.

User avatar
dvgrn
Moderator
Posts: 10685
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: font size bug on Conwaylife.com

Post by dvgrn » May 12th, 2015, 5:58 am

Scorbie wrote:I'm not sure if others also have this bug. When I click the 'Change font size' button on the top right corner of the page, (that looks like vA^)
the font does get smaller, but I cannot make the font return to its original size.
The same problem was reported a couple of years ago, with a slightly painful solution. In Google Chrome, I found that removing just the style_cookie didn't seem to work (under Settings / Show Advanced Settings / Content settings / All cookies and site data / search and click on "conwaylife.com", not "www.conwaylife.com"). Deleting three "php..." cookies was probably excessive, but it did the trick. Definitely no need to touch any wiki-related "njohns01home" cookies.

Still seems like a good idea to remove the dangerous font-reduction button...!

User avatar
Scorbie
Posts: 1692
Joined: December 7th, 2013, 1:05 am

Re: font size bug on Conwaylife.com

Post by Scorbie » May 12th, 2015, 6:21 am

Thanks. I'll try that out with my laptop after I get back home.

Interestingly, Opera on android seems to be immune to this phenomenon. (On my phone)

User avatar
dvgrn
Moderator
Posts: 10685
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: font size bug on Conwaylife.com

Post by dvgrn » May 12th, 2015, 6:38 am

Scorbie wrote:Thanks. I'll try that out with my laptop after I get back home.

Interestingly, Opera on android seems to be immune to this phenomenon. (On my phone)
Actually, I'm finding that just one thread on the forums is still contaminated by my experimentation this morning, and I can't seem to locate a cookie that I can remove to fix the problem. So far I haven't been able to track down the smoking-gun "A+" content that Andrew mentioned in the above linked thread.

Rumor has it that with enough patience, the problem will go away due to a timeout, so for the time being I guess I'd just recommend that people not give in to the temptation to click on that A^ button...!

User avatar
rowett
Moderator
Posts: 3821
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: font size bug on Conwaylife.com

Post by rowett » May 16th, 2015, 1:54 pm

This annoyed me enough to go and figure out how it was(n't) working.

There are several stylesheets referenced from the forum pages. The important ones that control the body font size are "print.css" which defines the default:

Code: Select all

body {
	font: 11pt Verdana, Arial, Helvetica, sans-serif;
	color:#000000;
}
and then three more which override the font-size only:
normal.css

Code: Select all

body {
	font-size: 10px;
}
medium.css

Code: Select all

body {
	font-size: 11px;
}
large.css

Code: Select all

body {
	font-size: 12px;
}
If you've never clicked the font size button then the default 11pt font is used as defined in print.css. The first time you click the font size button it switches to the size defined in normal.css and then each subsequent click it cycles through medium.css, large.css, normal.css and so on.
For those with a good attention to detail you'll have already noticed a problem. The default font size in print.css is defined in points (11pt) whereas the normal, medium and large overrides are define in pixels (10px, 11px, 12px). Pixels are smaller than points so even the large setting is smaller than the default.
The setting is saved in the Cookie called "style_cookie".

Nathaniel:
My suggestion would be to change normal.css, medium.css and large.css to contain something like 9pt, 11pt and 14pt respectively.
For reference the button calls a Javascript function fontsizeup() which is defined in styleswitcher.js.

User avatar
Scorbie
Posts: 1692
Joined: December 7th, 2013, 1:05 am

Re: font size bug on Conwaylife.com

Post by Scorbie » May 16th, 2015, 7:54 pm

(GASP) Real thanks for finding the bug!

User avatar
Nathaniel
Site Admin
Posts: 862
Joined: December 10th, 2008, 3:48 pm
Location: New Brunswick, Canada
Contact:

Re: font size bug on Conwaylife.com

Post by Nathaniel » May 29th, 2015, 6:03 pm

Big thanks to Chris for tracking down the bug. I've updated the CSS files with sizes 10pt, 12pt, and 14pt, and it looks much better to me now. Not sure why 12pt looked more "right" to me than 11pt -- presumably some other CSS file in the mess that is phpBB was over-riding the 11pt from print.css with 12pt from somewhere else.

Can anyone else confirm that the medium font size, when using the "change font size" button, looks OK (or doesn't look OK) on their machine/browser?

simeks
Posts: 408
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Re: font size bug on Conwaylife.com

Post by simeks » May 29th, 2015, 6:49 pm

Looks fine for me on Windows 7/Chrome!

User avatar
dvgrn
Moderator
Posts: 10685
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: font size bug on Conwaylife.com

Post by dvgrn » May 29th, 2015, 6:54 pm

Nathaniel wrote:Can anyone else confirm that the medium font size, when using the "change font size" button, looks OK (or doesn't look OK) on their machine/browser?
The three sizes look good now -- I'm also on Chrome in Windows 7.

When I fiddled with the font size, then opened a new conwaylife.com/forums window, the font for the index page showed up really small at first, and wasn't fixable by the "change font size" button.

However, a refresh fixed that, and now I don't get the unreadably small fonts any more no matter what I do. As far as I can tell the fix will work, at least after a cycle or two of opening forum pages.

The only remaining bug that I see is that the "down" and "up" options to the left and right of the "A" change-text-size icon all link to the same place -- so a click on any of the three locations just cycles up through the font sizes, then back to small again.

User avatar
Scorbie
Posts: 1692
Joined: December 7th, 2013, 1:05 am

Re: font size bug on Conwaylife.com

Post by Scorbie » May 29th, 2015, 7:00 pm

Works fine with windows 8.1/firefox and IE!
dvgrn wrote:When I fiddled with the font size, then opened a new conwaylife.com/forums window, the font for the index page showed up really small at first, and wasn't fixable by the "change font size" button.
Hmm, that doesn't happen in my machine.
dvgrn wrote:The only remaining bug that I see is that the "down" and "up" options to the left and right of the "A" change-text-size icon all link to the same place -- so a click on any of the three locations just cycles up through the font sizes, then back to small again.
You're right, But personally I'm okay with that.

User avatar
Andrew
Moderator
Posts: 933
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: font size bug on Conwaylife.com

Post by Andrew » May 29th, 2015, 7:39 pm

Works fine in Safari on my Mac -- thanks Chris and Nathaniel!
Use Glu to explore CA rules on non-periodic tilings: DominoLife and HatLife

User avatar
gameoflifeboy
Posts: 474
Joined: January 15th, 2015, 2:08 am

Re: font size bug on Conwaylife.com

Post by gameoflifeboy » May 29th, 2015, 8:10 pm

When I used the "Change font" option on Firefox an Ubuntu computer, all 3 font sizes suddenly became very small. Now when I visit the forums, everything is still tiny.

User avatar
rowett
Moderator
Posts: 3821
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: font size bug on Conwaylife.com

Post by rowett » May 30th, 2015, 8:38 am

gameoflifeboy wrote:When I used the "Change font" option on Firefox an Ubuntu computer, all 3 font sizes suddenly became very small. Now when I visit the forums, everything is still tiny.
You'll need to refresh the browser (at least once) to have the new styles loaded. Your browser may be using cached versions of the old styles.
dvgrn wrote:The only remaining bug that I see is that the "down" and "up" options to the left and right of the "A" change-text-size icon all link to the same place -- so a click on any of the three locations just cycles up through the font sizes, then back to small again.
It's slightly worse than that. The "vA^" is just a single element (an anchor displayed as a single image), rather than three that point to the same place - in this case a Javascript function called fontsizeup().
Interestingly (perhaps) there is also a Javascript function called fontsizedown(), that does what you'd expect, but it's not linked to anything. Both fontsizeup() and fontsizedown() have code that caters for 5 styles (font sizes) but only three are actually defined in the stylesheets.
Having said all that I'm actually fairly happy with the existing functionality.

User avatar
rowett
Moderator
Posts: 3821
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: font size bug on Conwaylife.com

Post by rowett » May 30th, 2015, 3:03 pm

Nathaniel wrote:Big thanks to Chris for tracking down the bug. I've updated the CSS files with sizes 10pt, 12pt, and 14pt, and it looks much better to me now. Not sure why 12pt looked more "right" to me than 11pt -- presumably some other CSS file in the mess that is phpBB was over-riding the 11pt from print.css with 12pt from somewhere else.
Yes, my mistake actually. "print.css" just defines the point size for "print" media (11pt). The "screen" media is defined in "style.css" as:

Code: Select all

font-size: 100%
which equates to 12pt.

Post Reply