• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

font size option to user

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We might decide to give an option to user to increase & decrease font size.
I personally think it's not useful & waste of effort as it's rarely used by users (I never looked for a button so I can increase or decrease font size) & it's already provided by browser...

What's your view on this?

Now as we might have to provide this option I can think of 3 things:
1. We don't persist this setting. As user moves to another page, we set font size to default - in other word, changes applies only for current page - not at all useful, IMO.
2. We persist this setting when user browses between pages - make sense but user might disappoint when he logins next time & he have to change this setting again.
3. We persist this setting unless use changes it again - sounds good but it might not be a pleasure experience for users who use different computers which has different resolution (or different screen size)...

What do you say? What could be a better approach?

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since they can control this with the browser itself, why bother?
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Since they can control this with the browser itself, why bother?



Yes but I can't make this decision to not to provide this option.
But I can certainly improve the way it should work.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is how I am planning to implement it:

HTML file:



CSS file:



Any suggestions for improvement?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ankur rathi wrote:

Bear Bibeault wrote:Since they can control this with the browser itself, why bother?



Yes but I can't make this decision to not to provide this option.
But I can certainly improve the way it should work.



Because it is so hard to do Ctrl+ ?

It you use ems for all of your sizes, it makes it easy as can be since all you would have to do is set the font-size of the body and everything else adjusts automatically. But I would guess you page is full of px so it will not work that way.

Eric
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"IE/Win will not allow readers to resize text that has been sized in pixels"
From: http://clagnut.com/blog/348/

I never knew this, anytime I wanted to increase/decrease font I just did Ctrl & 'mouse scroll', & it always worked.
But the above blog doesn't resize when I try to...

 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:

It you use ems for all of your sizes, it makes it easy as can be since all you would have to do is set the font-size of the body and everything else adjusts automatically. But I would guess you page is full of px so it will not work that way.

Eric



Thanks Eric.
I looked at em (ems) font size unit & also found a function which does resizing very well if font sizes are specified in em:



From: http://davidwalsh.name/change-text-size-onclick-with-javascript

I'll see if UX team can change their prototypes (from px to em). Why did they use px at the first place?
Thanks again.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
About persisting the setting, how is this idea?

When user clicks increase or decrease font size buttons, I'll send an ajax request (in addition to actually increasing or decreasing font size of page), that request will save the next (increased/decreased) font size in server (session or more persistent store depending on requirement), when user moves to other pages, this setting will be used to set body's font size...

Am I over engineering the things? Any simple way to achieve this?

Thanks.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't it be easier to just set a cookie with the current font size? You can do that in JavaScript.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Wouldn't it be easier to just set a cookie with the current font size? You can do that in JavaScript.



Thanks very much Ulf.
I'll go with JavaScript's cookies, if I have to keep it just for session (option # 2).
Liked it.

 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic