473,769 Members | 8,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Different size for different font

In his book "CSS: The Definitive Guide" 2nd edition (pgs. 116-117), Eric
Meyer has an interesting discussion about "font-size-adjust" that was
evidently dropped in CSS 2.1 due to browser non-support. I'm wondering
if there's some way I could still get a primitive version of this
functionality, because different fonts display at very different optical
sizes for the same nominal sizes.

For example, suppose I want type to display in 13px/1.5em Georgia. But
if the user doesn't have Georgia installed, and I've simply listed Times
New Roman as the alternate font in the usual way (or if "serif" gets
interpreted as Times on their system), then the type will display in
13px Times, which is optically much smaller than 13px Georgia (and has
optically different xheight/linespacing characteristics too). Even if I
used em instead of px, I'm guessing there'd be a substantial size
difference.

So what I'd really like, in the absence of "font-size-adjust", is
something like this:

p.someClass {font: 13px/1.5em Georgia, 15px/1.4em "Times New Roman",
14px/1.5em serif;}

....but I have a feeling that wouldn't actually do what I want. Er...
would it?

Any solution?
May 20 '07 #1
53 5267
Jonas Smithson wrote:
>
different fonts display at very different optical
sizes for the same nominal sizes.

For example, suppose I want type to display in 13px/1.5em Georgia.
Simple solution - don't specify an absolute font-size. If you leave it
at the default size (100%), then the user will see the font (be it
Georgia or not) in whatever size *they* think is optimal.

--
Berg
May 20 '07 #2
Scripsit Jonas Smithson:
In his book "CSS: The Definitive Guide" 2nd edition (pgs. 116-117),
Eric Meyer has an interesting discussion about "font-size-adjust"
that was evidently dropped in CSS 2.1 due to browser non-support.
It has now been implemented on Firefox 2 (on Windows).
p.someClass {font: 13px/1.5em Georgia, 15px/1.4em "Times New Roman",
14px/1.5em serif;}

...but I have a feeling that wouldn't actually do what I want. Er...
would it?
I doubt that. It violates CSS syntax.

You might be able to do something via client-side scripting, but that would
be off-topic here.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 20 '07 #3
Scripsit Bergamot:
Jonas Smithson wrote:
>>
different fonts display at very different optical
sizes for the same nominal sizes.

For example, suppose I want type to display in 13px/1.5em Georgia.

Simple solution - don't specify an absolute font-size. If you leave it
at the default size (100%), then the user will see the font (be it
Georgia or not) in whatever size *they* think is optimal.
You missed the point. Of course absolute font sizes should be avoided, but
that doesn't solve the problem.

For example, suppose you want to use Arial. Setting just font-family: Arial
works for a great majority of users. And there the problem is. If they have
set their browser to use a font size that is suitable for their browser's
default font, which is probably Times New Roman, they will see Arial in that
size, which is probably 12pt (16px).

While 12pt Times New Roman looks reasonable on screen, 12pt Arial looks too
big to most people. So what can you do?

If you ask me, you should just accept that. Too big font size is seldom
complained by _users_ (and quite often by designers), and users can reduce
the font size if it matters.

But many authors set e.g. font-size: 80% or even smaller. This is usually
not catastrophic, but it's not nice either, especially to users who have set
their browser to use e.g. Arial in 10pt size. The reduction takes the size
to 8pt, which is probably too small to be read comfortably.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 20 '07 #4
Jukka K. Korpela wrote:
>>different fonts display at very different optical
sizes for the same nominal sizes.

For example, suppose I want type to display in 13px/1.5em Georgia.

Simple solution - don't specify an absolute font-size. If you leave it
at the default size (100%), then the user will see the font (be it
Georgia or not) in whatever size *they* think is optimal.

You missed the point. Of course absolute font sizes should be avoided,
but that doesn't solve the problem.

For example, suppose you want to use Arial. Setting just font-family:
Arial works for a great majority of users. And there the problem is. If
they have set their browser to use a font size that is suitable for
their browser's default font, which is probably Times New Roman, they
will see Arial in that size, which is probably 12pt (16px).

While 12pt Times New Roman looks reasonable on screen, 12pt Arial looks
too big to most people. So what can you do?

If you ask me, you should just accept that. Too big font size is seldom
complained by _users_ (and quite often by designers), and users can
reduce the font size if it matters.

But many authors set e.g. font-size: 80% or even smaller. This is
usually not catastrophic, but it's not nice either, especially to users
who have set their browser to use e.g. Arial in 10pt size. The reduction
takes the size to 8pt, which is probably too small to be read comfortably.
This argument is all well and good in theory, but one important part of
it really isn't based -- in my experience -- in the real world. That
part is the "users who have set their browser to use...". I've come
across maybe two or three people in my years of Web work that have
utilized user style sheets beyond a little experimentation , and none of
them was your typical mainstream user. Most people don't even know such
a thing exists.

A few more may change the default font size in the browser View menu,
but very few, certainly (IMO) not enough to compromise ideal visual
appearance.

The way I see it, font size is largely an element of design. That is,
the designer can SUGGEST what they believe works best visually, so long
as they allow the user to size as needed (by using ems or percentages).
This way, one meets the accessibility needs of the vast majority of
users, while initially displaying the intended look.

I know YMMV, and some folks here will vehemently disagree with this
approach, but I've not gotten a single complaint from a client or client
user.

--

*** Remove the DELETE from my address to reply ***

=============== =============== =============== =========
Kevin Scholl http://www.ksscholl.com/
ks*****@comcast .DELETE.net
------------------------------------------------------
Information Architecture, Web Design and Development
------------------------------------------------------
We are the music makers, and we are the dreamers of
the dreams...
=============== =============== =============== =========
May 21 '07 #5
Kevin Scholl wrote:
I know YMMV, and some folks here will vehemently disagree with this
approach, but I've not gotten a single complaint from a client or client
user.
http://www.ksscholl.com/

Well 75% of 16px is 12px and on my monitor is a bit small for the copy
especially when grey on white...

Maybe folks don't complain they just don't come back.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
May 21 '07 #6
In article <JP************ *************** ***@comcast.com >,
Kevin Scholl <ks*****@comcas t.DELETE.netwro te:
Jukka K. Korpela wrote:
But many authors set e.g. font-size: 80% or even smaller. This is
usually not catastrophic, but it's not nice either, especially to users
who have set their browser to use e.g. Arial in 10pt size. The reduction
takes the size to 8pt, which is probably too small to be read comfortably.

This argument is all well and good in theory, but one important part of
it really isn't based -- in my experience -- in the real world. That
part is the "users who have set their browser to use...". I've come
across maybe two or three people in my years of Web work that have
utilized user style sheets beyond a little experimentation , and none of
them was your typical mainstream user. Most people don't even know such
a thing exists.
I assume you mean to include those who look into properties or
browser font preferences (Mac). If, in general, a user was not
comfortable with the font sizes he was seeing, then he would
likely get to do something about it. There is a sort of arms race
going on. Mostly, and ridiculously, authors use less than 100%
even for main body text (to look neat, to get more in etc). So
browsers either come with or are set by technicians or savvy
friends or users to show such comfortably. These defaults or
adjustments are made to compensate for the unnatural choices of
authors in general. When an author uses 100%, it can cause
surprise and comment about 'the bigness'.
The way I see it, font size is largely an element of design. That is,
the designer can SUGGEST what they believe works best visually,
Perhaps it behoves authors not to think this way as it is too
risky and too paper-print orientated in concept. Happier, and
much weaker of course, is the idea that font-size _range_ is an
element of design. In plain language, if a design looks good at a
few clicks either way of text size, so much better is the design
for websites. Your stated approach is different and can result in
one optimum and everything goes bad after this whereas what many
people have been thinking around these parts is that there is a
likely a cluster of nice enough and useful enough range of
font-size designs,

--
dorayme
May 21 '07 #7
dorayme wrote:
In article <JP************ *************** ***@comcast.com >,
Kevin Scholl <ks*****@comcas t.DELETE.netwro te:
>Jukka K. Korpela wrote:
>>But many authors set e.g. font-size: 80% or even smaller. This is
usually not catastrophic, but it's not nice either, especially to users
who have set their browser to use e.g. Arial in 10pt size. The reduction
takes the size to 8pt, which is probably too small to be read comfortably.
This argument is all well and good in theory, but one important part of
it really isn't based -- in my experience -- in the real world. That
part is the "users who have set their browser to use...". I've come
across maybe two or three people in my years of Web work that have
utilized user style sheets beyond a little experimentation , and none of
them was your typical mainstream user. Most people don't even know such
a thing exists.

I assume you mean to include those who look into properties or
browser font preferences (Mac). If, in general, a user was not
comfortable with the font sizes he was seeing, then he would
likely get to do something about it. There is a sort of arms race
That's rather my point. Most people, indeed a very small percentage,
actually do look into these things. Realistically, most don't need to,
and a well-designed site allows a user to resize text through the
browser's View menu without having to set a global minimum in the
browser setting (i.e., a user style sheet). Unfortunately, there are a
great many sites -- too many -- that are not designed in such a manner.
going on. Mostly, and ridiculously, authors use less than 100%
even for main body text (to look neat, to get more in etc). So
browsers either come with or are set by technicians or savvy
friends or users to show such comfortably. These defaults or
Honestly, I don't see this happening. A browser's font settings being
set to anything but the default is an exceedingly rare occurrence in my
experience. Again, I'm not saying my experience is the be-all, end-all,
though.
adjustments are made to compensate for the unnatural choices of
authors in general. When an author uses 100%, it can cause
surprise and comment about 'the bigness'.
>The way I see it, font size is largely an element of design. That is,
the designer can SUGGEST what they believe works best visually,

Perhaps it behoves authors not to think this way as it is too
risky and too paper-print orientated in concept. Happier, and
much weaker of course, is the idea that font-size _range_ is an
element of design. In plain language, if a design looks good at a
few clicks either way of text size, so much better is the design
for websites. Your stated approach is different and can result in
one optimum and everything goes bad after this whereas what many
people have been thinking around these parts is that there is a
likely a cluster of nice enough and useful enough range of
font-size designs,
Perhaps I should have specified to this point. Certainly I expect a
well-designed site to "behave" as font sizes are changed, at least
within some reason (I doubt all but the simplest sites would not break
layout if text is resized to its absolute maximium).

--

*** Remove the DELETE from my address to reply ***

=============== =============== =============== =========
Kevin Scholl http://www.ksscholl.com/
ks*****@comcast .DELETE.net
------------------------------------------------------
Information Architecture, Web Design and Development
------------------------------------------------------
We are the music makers, and we are the dreamers of
the dreams...
=============== =============== =============== =========
May 21 '07 #8
Kevin Scholl wrote:
[re: font-size:75% and other tiny settings]

I've not gotten a single complaint from a client or client user.
FYI, I've had font size discussions with almost everyone I've worked
with. You might be surprised at the number of users that are secretly
dissatisfied with the tiny type size prevalent on web sites. Once I
teach them how to adjust their browser settings (usually to make the
default larger), their only remaining complaint is that it doesn't work
on every web site.

BTW, I've never gotten a single complaint from a client or client user
about font-size:100% being too big, so your lack of complaints doesn't
mean there aren't any, just they don't tell you about it.

--
Berg
May 21 '07 #9
Scripsit Kevin Scholl:
This argument is all well and good in theory,
Before that statement, you quoted my entire message, practically speaking.
Comprehensive quoting generally indicates lack of comprehensive reading on
Usenet. In particular, you missed the point that my argument was practical -
actually, more practical than yours.
-- in my experience -- in the real world.
Your personal opinions don't become any more objective if you call them the
real world.
A few more may change the default font size in the browser View menu,
but very few, certainly (IMO) not enough to compromise ideal visual
appearance.
"IMO" is the key here; there's your real world: you _don't care_ about
people who set the font size.

Of course, this is just the top of the iceberg. There are millions of people
around who have never touched any relevant browser settings and to whom
their browser's basic font size is the _smallest readable_ size. So you want
to go below that, in your quest for "ideal visual appearance" (i.e., a look
that pleases _your_ eyes, or the eyes of your team, or whatever).

The default setting of 12pt is good exactly _because_ it is somewhat too
large to most people when sans-serif fonts are used. Give some thought to
the variation of people and browsing conditions, and you'll see this.
The way I see it, font size is largely an element of design. That is,
the designer can SUGGEST what they believe works best visually, so
long as they allow the user to size as needed
You don't present any concrete method so that we could evaluate it. If
you're suggesting body { font-size: 80% }, then that's usuallu not
catastrophic, as I wrote, though it prevents users from _easily_ selecting a
fairly large font size (since "largest" in the font size menu of IE is
relative to the size set on the page). But your tone of voice suggests
something more drastic. Even if it didn't, many newbies and clueless
"advanced" authors will apply your principles so that they set the font size
to the smallest value they can read in optimal circumstances. This is often
accompanied with other settings that reduce legibility further.

And, for example, the page mentioned in your sig (
http://www.ksscholl.com/ ) uses tiny text, in gray on a little lighter gray
background. Even when I set the font size to "largest" on IE, it's
inconveniently small due to insufficient contrast, and this means that for
millions of people, it's too small to read. Of course, _those_ people who
have _severe_ eyesight problems have already somehow configured, or have had
someone to configure, their browsing environment to deal with such issues,
e.g. by disabling all author stylesheets; otherwise they wouldn't be
browsing at all. But a much larger group just finds the page too difficult
to use due to its _visual presentation_.

Moreover, if you think that most people don't even use the font size menu,
you should be worried about hundreds of millions of people who just can't
read tiny gray text on gray background. They simply go away. Now you might
say that they are not your potential customers. But your potential
customers, tough young people with good eyesight, might understand the
importance of thinking about _their_ customers in a manner that you don't
seem to care about.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

May 21 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
15631
by: zwylle | last post by:
Hi all, to avoid a nervous breakdown I finally decided to seek help :D I have a table defined with plain color background and in some cells I show pictures to frame my site. The problem I have occurs for one special cell. The background of this cell is as you can see an image. A text should be displayed on this image. I don't want the text to be bigger than the picture.
16
4212
by: Geoff Cox | last post by:
Hello, I publish some web pages using large fonts and would like to give the user the opportunity to print the pages using a smaller font. I believe that this is possible using different style sheets? I am not clear how the user would select the different .css files? Seems to be easier than having duplicate html files ...
6
3850
by: John Topley | last post by:
Hi, I'm trying to create a pure CSS layout using DIVs. I have three DIVs (in one column) down the left hand side of my page, with a ten pixel vertical gap between each of them (the content is on the right). At the moment these DIVs are all using absolute positioning, with dimensions and co-ordinates specified in pixels. How can I make it so that if the user increases the font size the DIVs enlarge to accommodate the content but still...
2
3205
by: twan.vanberkel | last post by:
Dear all, I have a problem in difference in font size on my navigation bar. On different Windows PCs with IE5-IE6 the font size differs. At first I try to fix it to place <font> tags around the text like: <table summary=" " width="100%" class="blokstijl3" cellpadding="10pt"> <tr> <td class="venster">
6
2434
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution options and DPI options. However when I tried to run it in a dell P3 desktop, labels and textboxes overlapped each other and they were in table area too. Any suggestions? Do I have to put all controls in table cells?
3
2039
by: Chifo | last post by:
hello. i have a problem with a populate html table with data from table here it's the problem two querys retrieving data from table, one of querys show me a colletion of data from 6:00 am to 15:30 pm timestampz, i put this on a part of html table. when time on my if condition es great than 15:31, showme data from 15:31 to 23:59 timestamp and populate another part of html table. but, data in html first part,it's gone away.
5
4485
by: Syl | last post by:
Hello experts!! The top menu navigation bar displays perfectly in IE, but does not display properly in Mozilla or Netscape : http://checkeredshirt.com/textonly.html For some reason the non-IE browers are forcing the top navigation menu to dislpay "staggered" after the the first <ul><lielement. Can anyone see why this is happening ?
3
2498
by: Ryan Liu | last post by:
Hi, I have a big urgent problem to solve. I used to use Windows 2000 Chinese version, now I installed Windows XP (English) system. The problem is not about 2000 or XP, it is about English and Chinese. All forms of my compiled C# desktop application, as well as in Visual Studio
9
1866
by: RayDube | last post by:
Hello Gents, I want to be able to reward my members with credits, banner advertisements, text advertisements and even cash, but on a partially manual basis. I created a page where I could decide how many members would get a reward, and then update them based on the member id and details I enter, here's the code for the page: <?php /** * @author Raymond Dube * @copyright 2008
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.