473,800 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font-size starting size

Hello,
I just joined this group and saw the discussion "What do you think of
resizing 1em to 10px?" I am somewhat confused by what y'all think should be
used as a reference size.
I was surprised that someone actually suggested ems as a reference. Ems
are relative to a selected point size, the width in points of a capital M.
If no point size is given, what size does an em become? The browser
obviously must decide.
Also setting the body text to 62.5% is, well, stupid. % of what? I should
*assume* 16 pixels? Bad thinking. And not my experience with browsers.

Using pixels does not scale very well at all. Text look quite large on a
17" 800x600 monitor, and quite small on a 20" 1600x1200 or 17" 1400x1050.
Our site recently changed from using hard-coded pixel settings to
assigning a default body text size in points and using % to set the other
sizes up or down. It has a more consistent look that way on displays of
different physical dimensions and resolutions.
I used "font-size=11pt" to define the reference size (which on my display
here is about 16 pixels). It is, of course, not very exact; it depends on
the browser and the display system to decide on what represents 1 point
(1/72 inch).

So after all that.... What is considered good practice for the base font
size?

--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)
Jul 20 '05 #1
21 2877
James Moe <jm************ ***@sohnen-moe.com> wrote:
I just joined this group
Welcome. Now please read the fine FAQs.
Ems
are relative to a selected point size, the width in points of a
capital M.
You're fundamentally wrong. The em unit denotes the size of the font,
which has no defined relationship with any width.
If no point size is given, what size does an em become?
Read the FAQ.
The browser obviously must decide.
No, the user.
Also setting the body text to 62.5% is, well, stupid.
Of course.
I used "font-size=11pt" to define the reference size


And you got it ignored, right? Or did you use a broken browser?
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
On 4 Jun 2004 22:53:07 GMT, James Moe <jm************ ***@sohnen-moe.com>
wrote:
Ems are relative to a selected point size, the width in points of a
capital M. If no point size is given, what size does an em become? The
browser obviously must decide.
The "em" in CSS is not identcal to the print em. It is the default size of
a typical character after any inhereted adjustments. 1em is equivalent to
100%.

Ex. p {font-size:1.5em} means the p element text will be 150% of the
default.

However: body {font-size: 110%} p {font-size: 0.911em} means the p is back
to 100% or so.
Also setting the body text to 62.5% is, well, stupid. % of what?
Of whatever the user has set his preferred font size in the browser, or
the default size if it hasn't been set.
I should *assume* 16 pixels? Bad thinking. And not my experience with
browsers.
I agree. Assuming a particular pixel size is unwise.
So after all that.... What is considered good practice for the base
font size?


Nothing set at all, or use 100% or larger in the body element. This lets
the browser render the text at the size the user prefers, if he has set a
preference, or at the default setting, which that user should be quite
used to.
Jul 20 '05 #3
Neal <ne*****@yahoo. com> wrote:
The "em" in CSS is not identcal to the print em.
It is the same concept: the size of the font.
It is the default
size of a typical character after any inhereted adjustments.


I wonder where all this misunderstandin gs about em stem from. The height
of a typical character is _much_ smaller than em, and the widths of
characters naturally vary, and they too are typically _much_ smaller than
em. The em unit does not denote any dimension of any specific character,
or any average dimension of characters.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4
James Moe <jm************ ***@sohnen-moe.com> wrote:
Hello,
I just joined this group and saw the discussion "What do you think of
resizing 1em to 10px?" I am somewhat confused by what y'all think should be
used as a reference size.
[Musings snipped.]
So after all that.... What is considered good practice for the base font
size?


Secret users business. It is not necessary to specify a base font size
in an author stylesheet because the base font size is a *USER
SETTING*. I set it on my browser and you don't worry about it. I've
done all the worrying for you.

Don't give it another thought, it's all been taken care of. Consider
this:

sky {background-color: blue}

Why would you bother - it's already taken care of? You wouldn't give
it a first, let alone second, thought. Same with my browser settings -
don't give it a second thought.

Some alternative theories about the colour of the sky:

http://groups.google.com/groups?q=g:...hc45%404ax.com

http://groups.google.com/groups?hl=e...E8%40yahoo.com

--
Jul 20 '05 #5
James Moe <jm************ ***@sohnen-moe.com> wrote:
I was surprised that someone actually suggested ems as a reference. Ems
are relative to a selected point size, the width in points of a capital M.
You're a few centuries out of date. In modern typography the em is the
height of the font, which may or may not be the width of the capital M
(if such a letter exists in the font in question) in any given font.
If no point size is given, what size does an em become? The browser
obviously must decide.
When defining font-sizes the em is the size of the parent element's
font. Ultimately the root element has a font size set by the browser's
configuration. This is the size that the user has chosen (or chosen to
leave at the factory setting).
Also setting the body text to 62.5% is, well, stupid. % of what?
Yes it is stupid, because that's only 62.5% of the users chosen
default font size.
I should *assume* 16 pixels?
You might assume that. Other people would more correctly assume that
it would be 62.5% of the browser's default font size, of which 16px is
a common but not universal value.
Using pixels does not scale very well at all.
True. Beacuse browsers do not interpret the CSS spec correctly with
regard to the px element.

There's also the problem that Windows IE does not allow users to
easily resize text sized in px.
Our site recently changed from using hard-coded pixel settings to
assigning a default body text size in points and using % to set the other
sizes up or down. It has a more consistent look that way on displays of
different physical dimensions and resolutions.
But pt relate directly to real world physical measurements. So your
body size set at 11pt should be 11/72 of an inch regardless of all
other factors. Did you put a ruler up to the screen and measure it?
Did any browser get it right?

What happens when teh page is projected onto a wall screen? Is the
text still 11pt? How can anyone read 11pt text from across the room?

And there's also the problem that Windows IE does not allow users to
easily resize text sized in pt.
I used "font-size=11pt" to define the reference size
Which should be ignored as it's totally incorrect syntax.
(which on my display here is about 16 pixels).
Which may be because 16 pixels is the default and the browser is
ignoring you incorrect syntax? Or it may be that your screen has a
resolution of 105 pixels per inch. Or it may be that your browser is
following typical practice and assuming a resolution of 96dpi and thus
11pt is 14.7 pixels (falls within "about 16 pixels") regardless of the
actual resultion.
It is, of course, not very exact; it depends on
the browser and the display system to decide on what represents 1 point
(1/72 inch).
Most modern browsers assume 96dpi and so 12pt = 16px and everything
flows from that. Some browsers assume other resolutions, e.g. if you
set Windows to use Large Fonts is assumes 120dpi and hence your 11pt
would be 18.3 pixels.
So after all that.... What is considered good practice for the base font
size?


Whatever the user has configured their browser to use.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #6
Steve Pugh wrote:
James Moe <jm************ ***@sohnen-moe.com> wrote:

[snip]
Also setting the body text to 62.5% is, well, stupid. % of what?


Yes it is stupid, because that's only 62.5% of the users chosen
default font size.
I should *assume* 16 pixels?


You might assume that. Other people would more correctly assume that
it would be 62.5% of the browser's default font size, of which 16px is
a common but not universal value.

[snip]

It is only 62.5% of the browser's default font size if the font-family is left
as the default. If the font-family is specified when the 62.5% is specified,
the practical percentage of the user's default font cannot be determined.
Because it is unknown what the subjective & objective size of the specified
font is compared with that of the user's default font.

(I don't advocate 62.5%, which is new to me! But I observe that, on my system,
13px Arial & 80% Arial are subjectively & objectively about the same size as
my default font, which is 16px Times New Roman. This requires a somewhat
narrow measure of objective size - in fact the 13px Arial width of some text I
used for analysis was 97% of the width of the 16px Times New Roman, and
certain letters such as lower-case "o" were the same size, as 16px TNR, at
somewhere between 13px & 14px Arial).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #7
On Sat, 5 Jun 2004 05:37:20 +0000 (UTC), "Jukka K. Korpela"
<jk******@cs.tu t.fi> wrote:
Neal <ne*****@yahoo. com> wrote:
The "em" in CSS is not identcal to the print em.
It is the same concept: the size of the font. It is the default
size of a typical character after any inhereted adjustments.

I wonder where all this misunderstandin gs about em stem from.
Yea; Me to gets astonished at some of the interpretations that pops up
every now and then.
The height of a typical character is _much_ smaller than em


Well; to the naked eye yes, but...

The majority of fonts designed within the previous millennium are
designed to fit on a lead block destined to be set in a printing frame.

In order to facilitate easy typesetting, all lead blocks used in a
printing frame has to be of the same height (for western alphabets that
is).

Following that, the minimum height of a lead block, intended for use in
traditional typesetting, must be as high as required to "house" any one
single character in the font in use when each and every character in
that font is placed on a common baseline.

So the net result is that 1em becomes equal to the height of the lead
block required to "house" any one character in any given font design.

Note; this includes height to "house" character decenders just as well
as diacritical marks, should they be designed parts of the font at hand.

The definition of one 'em' in CSS1 is derived from traditional
typesetting and I have at one time been in live "person to person"
discussion with Haakon on this subject and there is no doubt that the em
definition in CSS1 has its roots in the minimum required height of a
lead block, as used in traditional typesetting for prints.

Further; it can be empirically proven that font designers as early as
Claude Garamond (hundreds of years back) was thinking along the same
line.

The "Plantin Moretus Museum" in Antwerp, Belgium, has a large set of
Claude Garamond's original design work in storage. One very specific
item there is the Garamond definition of what we would call an "em dash"
which just "happens" to be designed to fit the full width of a _square_
lead block with a block height equal to all other block character casts
available.

Naturally we can also find an "en-dash" in the Garamond font and from
the best judgment I was able to make on site, the Garamond en-dash is
very close to half the width of the em-dash.

Given the fact that there is European historical roots available for the
definition of one 'em' I would, provocatively, move on to say that any
saying to the effect that "1em is equal to the width of letter 'm' or
'M'" is nothing but Bullshit of Anglo-Saxon origin :-)

--
All the best...
Rex

P.S. Why did Knuth fall for that "em is letter 'm' width" thingy in
LaTex?

Jul 20 '05 #8
Tim
On Sat, 05 Jun 2004 14:00:33 +0200,
Jan Roland Eriksson <jr****@newsguy .com> posted:
Given the fact that there is European historical roots available for the
definition of one 'em' I would, provocatively, move on to say that any
saying to the effect that "1em is equal to the width of letter 'm' or
'M'" is nothing but Bullshit of Anglo-Saxon origin :-)


The only definition that I ever had much faith in was saying that the em
was the "size" of the "M" (not the width, not the height, but the size of
the whole thing, taking into account all aspects of printing the letter
amongst other letters (including ascenders, descenders, the usual space
around it, etc.).

On every browser that I've played with, it's impossible to correlate the
size of the em to any of the characters that you can display (e.g. do
something that's 12 ems big, then try and compare that to any 12 characters
in a row or column), and it's made doubly worse by the limited applications
of what CSS can do with it.

For instance, if I was to make a box (e.g. a div) have margins around it so
it was smaller than the surrounding body, and used ems to set the margins,
they seem to be based on the size of characters inside the div, yet I'd
rather be able to set the margin sized based on the surrounding characters
on the page. The worst example being trying to do something like a big
bold warning - it gets a huge margin around it.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #9
Jukka K. Korpela wrote:
James Moe <jm************ ***@sohnen-moe.com> wrote:
I just joined this group Welcome. Now please read the fine FAQs.

And the link is?: _______________ ____________
Ems are relative to a selected point size, the width in points of a
capital M.
You're fundamentally wrong. The em unit denotes the size of the font,
which has no defined relationship with any width.

You, and others, have noted the poor phrasing. An em (aka: em square, em
box) is the default distance between baselines without extra leading.
If no point size is given, what size does an em become?

Read the FAQ.

(See above.)
The browser obviously must decide. No, the user.

Quite so. My mistake.
My confusion stemmed from forgetting this obvious fact: the user does
indeed set the base size.
I used "font-size=11pt" to define the reference size

And you got it ignored, right? Or did you use a broken browser?

A typo.
Just writing "Bzzt! Wrong!" is not helpful. I joined this group to learn
more about stylesheets and their use.
--
jmm dash list at sohnen-moe dot com
(Remove .TRSPAMTR for email)
Jul 20 '05 #10

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

Similar topics

1
4190
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS structure. I seem to be doing this correctly, but when I try to create a System.Drawing.Font object with the Font.FromLogFont, the new Font object has a different Name than the LOGFONT.
10
4053
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out the web page in question... http://clientserver.home.comcast.net/unicode.html If you examine, for a few examples, characters such as square root (&amp;#8730;), prime (&amp;#8242;) and double prime (&amp;#8243;).
3
7226
by: Barry Anderberg | last post by:
I'm using the .NET Memory Profiler by Sci Tech and I wrote a little test application to verify something odd I observed and it appears that System.Drawing.Font fails to dispose of its FontFamily. I run the following code: // BEGIN while( true ) { System.Drawing.Graphics dc=lblClock.CreateGraphics();
3
26571
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object cannot be written to the XML config file. Next time the program is started the font is read from the config file. But how to convert the string to a Font object? -- Wim
3
3675
by: pnp | last post by:
I have created a coposite user control of a text box and a label. I have exposed the font of the textbox property through a property of the control but every time I try to change that through the property grid of the designer when I use the composite control in a form, after a rebuild the changes seem to get lost! I don't see the Font property anywhere in the inner code... What am I doing wrong?
4
1942
by: BobAchgill | last post by:
Is it possible to use a font that is not stored in the windows font directory? I would like to use a font that is stored in my application directory... But this does not seem to work... rtbMyRichTextBox.SelectionFont = New Font(CurDir() + "\" + "MyFont.ttf", 12, FontStyle.Bold) Thanks!
6
8100
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a Private Font Collection” .... I only see a default font written to the form NOT the private font that was loaded. Ofcourse I see the right font written if the font is already one that is installed in the system. But if the private font that I...
1
2728
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, btnCalculate.Font.Style | FontStyle.Bold);
24
2844
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show the fonts i want. If i cahnge the printer to the printer that
16
1886
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have not been able to figure out a way that it can also produce a font. Thanks Carl
0
9690
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10504
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
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7576
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
6811
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
5469
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
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
3764
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.