Re: [css-d] what font is being called?

2011-01-14 Thread Richard Mason

On Fri, 14 Jan 2011, Alan Gresley wrote

I am not a programmer and I wouldn't know the first thing about 
building a UA since I not even sure what web language or languages are 
involved in the process.


C++

--
Richard Mason
http://www.emdpi.com
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] what font is being called?

2011-01-13 Thread Richard Mason

On Thu, 13 Jan 2011, Philippe Wittenbergh wrote


On Jan 13, 2011, at 12:48 PM, Richard Mason wrote:

Speaking of CSS specs I'm always surprised that the spec authors 
don't get called out for the nonsense they put in them. A 
specification should tell an author (a programmer) what is required. 
It should not tell them how to do it or explain computer fundamentals,


The CSS specs don't assume that Author = Programmer
Author is commonly understood as 'someone who writes a stylesheet'
(I bet that most people following css-d as not programmers)



I bet they're not either, but the CSS specifications are actually 
Software Requirement Specifications aimed at programmers rather than 
'your' author the style sheet producer. The specifications are written 
so that a programmer (software author) can write a browser that handles 
a 'sheet' written in a particular format and to a given set of rules.


A programmer can produce a browser that handles a style sheet when they 
have the formal specification, and don't need a User Manual (a book on 
CSS). On the other hand people who do have a User Manual can produce 
perfectly correct style sheets without ever reading the formal 
specifications.


--
Richard Mason
http://www.emdpi.com
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] what font is being called?

2011-01-13 Thread Richard Mason

On Thu, 13 Jan 2011, Alan Gresley wrote


http://www.w3.org/TR/CSS21/about.html#reading

 | This specification has been written with two types of readers in mind:
 | CSS authors and CSS implementors. We hope the specification will 
provide

 | authors with the tools they need to write efficient, attractive, and
 | accessible documents, without overexposing them to CSS's 
implementation

 | details. Implementors, however, should find all they need to build
 | conforming user agents. The specification begins with a general
 | presentation of CSS and becomes more and more technical and specific
 | towards the end.


I said the specs were 'aimed' at programmers, not 'exclusive to'. Your 
quote confirms this:
Implementors, however, should find all they need to build conforming 
user agents.
So, a Software Requirement Specification also made available to CSS 
authors


--
Richard Mason
http://www.emdpi.com
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] what font is being called?

2011-01-12 Thread Richard Mason

On Wed, 12 Jan 2011, Bruno Fassino wrote

Yes, the computation of the aspect ratio gives results depending on the 
size. But this does not mean that such computations are wrong.


I'm not sure I understand that sentence, but I think you would agree 
that it is desirable to state in information sources on this topic that 
x-height varies with font size, and a reason why as you have indicated. 
From there one could perhaps reasonably say that it isn't particularly 
important, and if the value can not be deduced the browser invents one 
but I certainly don't think that sources should invent values, like the 
CSS spec used to, and say they are fixed. People read these documents, 
take the false data as fact carved in stone, and then repeat it in books 
and articles that are read for years.


Speaking of CSS specs I'm always surprised that the spec authors don't 
get called out for the nonsense they put in them. A specification should 
tell an author (a programmer) what is required. It should not tell them 
how to do it or explain computer fundamentals, unless there is a really 
special need to do so. You shouldn't expect to have to explain to a 
programmer how to do their job any more than you would ask a skilled 
carpenter to make a cabinet and then insist on telling them what a tape 
measure is and how to use it.


We have this in the CSS Fonts Module Level 3 3.7 Relative sizing: the 
‘font-size-adjust’ property
Authors can calculate the aspect value for a given font by comparing 
spans with the same content but different font-size-adjust properties. 
If the same font-size is used, the spans will match when the 
font-size-adjust value is accurate for the given font.
True? Possibly. But no competent programmer in their right mind would 
get values this way when the Operating System API's will give them the 
answer directly.


--
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Re: [css-d] what font is being called?

2011-01-11 Thread Richard Mason

On Wed, 12 Jan 2011, Philippe Wittenbergh wrote

If you want/need to know the aspect ratio of a font, this service can 
help (for fonts installed on your local drives):

http://fontdeck.com/font-size-adjust.html
or this page:
http://brunildo.org/test/fontlist3.html


Both wrong because the aspect ratio of a font is not fixed but varies 
with font size.
At http://www.emdpi.com/cssfontsizeadjust.html I have a download with 
graphs of aspect ratio v font size (10px to 50px) for a number of fonts.


--
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] what font is being called?

2011-01-11 Thread Richard Mason

On Wed, 12 Jan 2011, Philippe Wittenbergh wrote
Both services will give you an idea of how the aspect-ratio of the 
fallback font will relate to the first-choice font. That is the point. 
Without using font-size adjust, it doesn't matter much beyond that (and 
even with font-size-adjust, it doesn't really matter).


OK, so next time instead of:
If you want/need to know the aspect ratio of a font, this service can 
help


You could say:
If you want/need to know the aspect ratio of a font, both services can 
help you get the completely false idea of how the aspect-ratio of the 
fallback font will relate to the first-choice font, but it doesn't 
matter so I wouldn't bother anyway.


Interesting :-)

--
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] tiny font in Safari and Chrome

2010-05-28 Thread Richard Mason
On Fri, 28 May 2010, Jay Tanna wrote

There are three units one should be very careful;
Indeed. :-)

They are em, px and ex.  px is relative to the device used to view the 
web; ex is the x-height of the font ie the width of the font (in 
cartesian geometry xy units).

x-height is a height, not a width, and the units are no different to any 
other font metric.
http://www.emdpi.com/css3xheight.html

No matter what the unit everything on my screen ends up being rendered 
as pixels so the differentiation is fairly meaningless - as is the 
categorisation of units as relative/absolute that authors are so fond 
of.

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Screen resolution?

2009-08-12 Thread Richard Mason
On Tue, 11 Aug 2009, Alan Gresley wrote

1. The 96px and 72pt boxes are the same size with a 96 DPI setting for
the monitor.

A point is 1/72 of an inch. Screen dpi's only purpose is to translate a 
measurement in inches to pixels.

pixels = inches * screen dpi

It's as simple as that. Whenever _anything_ is specified in inches for 
display on a screen then this is the equation that programmers use to 
translate inches to pixels.

(72 pts/ 72) = 1 inch
1 inch * 96 dpi = 96 pixels
http://www.emdpi.com/screendpi.html

2. The 100px and 75pt boxes are the same size with a 96 DPI setting on a
  monitor
(75 pt/72) * 96 = 100 px

but also they are exactly 1 inch (using a ruler) in height and
width.

Only because you have a screen physical pixel density which happens to 
give you 1 inch. They are certainly not 1 inch on my screen.

3. When the DPI setting is changed to 120 DPI, the boxes using pts
become 125% of their size at 96 DPI.

(75 pt/72) * 120 = 125 px
i.e. 125% of 100

4. The boxes using pixels are the same size and the box of 100px at
either 96 or 120 DPI still equals exactly 1 inch (using a ruler) in
height and width.

Try accurately measuring inches on a CRT with a curved screen, with the 
drawing surface separated from your ruler by a thick piece of glass, to 
say nothing of getting an undistorted image after playing with the 17 
different CRT screen adjustments. Measuring inches on a screen is futile 
- and didn't suddenly become sensible because we changed from CRT to 
LCD.  A screen is not a piece paper.

My question to you is why  a box of 100px equals a inch measured by a
ruler and not what I expected 96px?

Don't understand the statement.

BTW, I thought the higher DPI setting would make the text smaller. I now
discover the reverse is true where the text and chrome of the browser is
larger.

The equation again, which is true for all inch length measurements on a 
screen
pixels = inches * screen dpi
Increase screen dpi and you increase pixels

Also there seems to be view that screen dpi can only be 96 or 120. 
Screen dpi can be adjusted in the Control Panel by small steps between 
19 dpi and 480 dpi. The elastic ruler.
http://www.emdpi.com/screendpi.html

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Screen resolution?

2009-08-12 Thread Richard Mason
On Wed, 12 Aug 2009, Rob Emenecker wrote

 My question to you is why  a box of 100px equals a inch
 measured by a
 ruler and not what I expected 96px?
 
 Don't understand the statement.

I'll take a stab at this one...

I didn't make clear what I meant when I said I don't understand the 
statement. I was querying why he would expect a 100px box to be 96px.

If I have my Win OS set to 96 dpi (that is DOTS = PIXELS; DOTS  POINTS) on
a 1920x1200 monitor the size of a ONE INCH object will be different if that
1920x1200 monitor is a 21, 24, on 15 laptop monitor.

Of course. On paper inches are physical inches. On a screen inches are 
logical inches. Logical inches and physical inches are not the same 
thing as I explain here:
http://www.emdpi.com/screendpi.html

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Screen resolution?

2009-08-12 Thread Richard Mason
On Wed, 12 Aug 2009, Felix Miata wrote

On 2009/08/13 10:59 (GMT+1200) Richard Mason composed:

 ... On paper inches are physical inches. On a screen inches are
 logical inches. Logical inches and physical inches are not the same
 thing as I explain here:
 http://www.emdpi.com/screendpi.html

Your second and third sentences need a qualifier. Logical inches need not be
different in size from physical inches.

Indeed, but I never said they had to be. Windows allows one to manually 
change the screen dpi (pixels in a logical inch) so that on a particular 
monitor a logical inch matches a physical inch but why, generally, would 
anyone want to do that? A monitor is not a sheet of paper and the 
distance and orientation one reads text on paper is quite different to 
that at which one reads text a screen.

Non-broken computer displays have
been reporting both size and resolution for quite some time.[1]
Just because something is reported you can't assume it's accurate!
http://www.emdpi.com/screenppi.html.
To quote myself:
  The screen width values that Windows has retrieved for the LCD screens 
are near enough to those obtained by measuring screens with a ruler, but 
are way out for the CRT and Laptop screens. You can see there's a 
problem. A programmer can't rely on Windows to get actual screen 
dimensions, and if you don't know the real physical size of the screen 
then you can't draw physical lengths on the screen that match those on a 
ruler.

But you don't _need_ to draw lengths on a screen so that they match 
those on a ruler.

 That most
computer desktop environments do not use that information to adjust logical
inches to equal physical inches does not mean it is not possible.
Seeing as in Windows there is no way, programmatically, of:
1. Both reliably and accurately getting the screen size for any type of 
monitor.
2. Adjusting the screen dpi.
Then I would say it is not possible. If anyone knows differently then I 
would be happy to see the data.

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font size dilemma

2009-03-16 Thread Richard Mason
On Mon, 16 Mar 2009, Cheryl D Wise wrote

 However, Firefox does
not recognize the 120dpi or whatever other settings you choose in your OS
and will continue to display it as the browser's default point size.

Firefox's default font size is in pixels, not points, so conversion from 
points to pixels via screen dpi is not required.
http://www.emdpi.com/fontsize.html

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font size dilemma

2009-03-15 Thread Richard Mason
On Sun, 15 Mar 2009, Tim Climis wrote

I gradually learned through online reading that that was not the right way to
do it, and stopped, but I've never been able to figure out why it's wrong in
the first place.

One reason is that points are inches and some people who write about 
these topics just don't understand how an Operating System 
differentiates between inches on paper and inches on screen.
In computer typography a point is 1/72 of an inch so anything measured 
in points is actually measured in inches.

In Eric Meyer on CSS he says There is no clearly defined mapping 
between pixels and the physical world. How many pixels should there be 
per inch?.

Nonsense. Of course there are completely defined mappings of inches to 
pixels. Programmers have been writing text editors and word processing 
programs for years where they clearly map font size in points (inches) 
to pixels on screen.
When printing the programmer knows the size of the piece of paper, but 
when putting text on screen the programmer has no way of reliably, or 
accurately, knowing the size of your screen so there had to be a 
standard way of converting lengths specified in inches into lengths in 
pixels, and this is done by using 'screen dpi', the value of which, in 
Windows,  we can change in the Control Panel

Length in inches * screen dpi = Length in pixels

So if something is specified as one inch long and screen dpi is set, via 
the Control Panel, to 102 dpi (my current setting) then:
1 * 102 = 102 pixels. Unfortunately people then put their ruler up to 
the screen and find it's not one inch on their ruler so incorrectly 
conclude that There is no clearly defined mapping between pixels and 
the physical world'. Add to that the fact that the actual physical 
number of pixels per linear inch (determined by the monitor 
manufacturing process) is specified as a number of dpi it's hardly 
surprising that there is confusion and inches get a bad press.

After all that, browsers (as opposed to the Operating System) don't 
treat inch measurements in a completely consistent manner why be 
surprised? They don't seem to treat many other quantity's in a 
consistent manner either e.g. Don't use pixels because 
If inches are going to get a bad press then authors should do so for the 
right reasons, not the spurious reasons so often seen.

It seems that this whole font sizing mess boils down to the fact that pixel
is not a standardized unit of measure.  one pixel on my monitor is a different
size from one pixel on your monitor.

The word standard means what here? The CSS spec tries to define a 
standard pixel, and talks rubbish.
Actually one pixel on your monitor is different to another pixel on your 
monitor at different times. If, say, you usually operate at 1280 * 1024 
and then switch to 1024 * 768 then 20% of pixels have 'disappeared' both 
horizontally and vertically, but the whole screen is still filled. 
Pixels have changed their size.

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font sizing

2009-02-18 Thread Richard Mason
On Wed, 18 Feb 2009, Ron Koster wrote

I understand what you're saying, but specifying font sizes in pixels 
*does* guarantee that things will look *proportionally* the same, 
regardless of browser/platform. If I specify my font sizes as:

9px, 14px, 23px, 37px, etc.

Not really.
There is only a loose relationship between font size and how 'big' text 
looks on screen.
http://www.emdpi.com/fontsize.html

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font stack article

2009-01-12 Thread Richard Mason
On Mon, 12 Jan 2009, Bruno Fassino wrote

In the Firefox source I see this
DWORD len = GetGlyphOutlineW(dc, PRUnichar('x'), GGO_METRICS, gm,
0, nsnull, kIdentityMatrix);
 ...
mMetrics-xHeight = gm.gmptGlyphOrigin.y;

I know nothing about this (I'm not even sure to have identified the
correct place in the code), anyway this looks like a sort of rendering
and retrieving of the data for a character.

Well spotted. I missed that one.

The function returns glyph information for x in a structure at a 
memory address specified by gm. One of the values returned in the 
structure is the top-left x,y co-ordinates of a box that completely 
encloses the glyph - so given that the box origin is 0,0 then 
gm.gmptGlyphOrigin.y (xHeight) is the height of the box.

Now I'll have to update my web page :-)

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font stack article

2009-01-11 Thread Richard Mason
On Sun, 11 Jan 2009, Bruno Fassino wrote

Hello Bruno,

Your article is interesting, but I do not fully agree on your
conclusion that browsers do not know the x-height.

Badly phrased perhaps. I meant that it is not possible programmatically 
to directly read the x-height font metric. This page 
http://msdn.microsoft.com/en-us/library/ms534014(VS.85).aspx shows the 
parameters that can be read, by a call to the appropriate Operating 
System function, for an installed font. Note otmsXHeight which is the 
x-height and the comment further down Not supported. It's immaterial 
whether the OS is just being awkward, or the x-height is not stored in 
the font file - if the OS can't _directly_ retrieve a value then neither 
can a browser. For a browser to get a value for x-height the only 
logical choices would be seem to be some sort of Look-Up-Table or 
rendering and measuring the character.

If you ask Gecko a box with width 1ex, it gets it
correctly,
I'll have a closer look at the correspondence between ex box dimensions 
and results from my pixel counting program :-)

I'll never quite understand why CSS spec writers put in a requirement 
that browser authors determine x-height and then, instead of leaving the 
programmers to implement the requirement, they tell them what the 
answers going to be  - and get it wrong.

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Font stack article

2009-01-09 Thread Richard Mason
On Fri, 9 Jan 2009, Dejan Kozina wrote

The size differences might be a good chance to try out the 
font-size-adjust property[1]. Last time I've heard about it was on this 
list  in 2007 ([2] and [3]), but except for Firefox[4] I'm unsure about 
the browser support today...

Reference [1] says The example given clearly shows that the browser 
knows the x-height of Times New Roman to do the calculation.. 
That's wrong. Browsers do not know the x-height of a font because the 
Operating System doesn't know.

http://www.emdpi.com/css3font.html
-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Maximum value for em

2008-02-07 Thread Richard Mason
On Thu, 7 Feb 2008, Geoffrey Hoffman wrote

ust speaking off the top of my head here... The size of an em is 
derived from the text size of the container. I haven't actually 
calculated it but say if your font-size is 12px then an em is about the 
same, or at least proportional to it.

One em is the font size of a font. If font size is 12px then one em is 
12px.

http://www.emdpi.com/emsquare.html

-- 
Richard Mason
http://www.emdpi.com
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] What's wrong with my line-height calculations?

2007-04-09 Thread Richard Mason
On Mon, 9 Apr 2007, Jukka K. Korpela wrote

unless I'm missing something, Windows internally expresses font sizes 
in points

For the screen Windows internally expresses font sizes in pixels.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fon
text_8fp0.asp
The CreateFont function creates a logical font with the specified 
characteristics. The logical font can subsequently be selected as the 
font for any device. The height of the font (nHeight) specifies the 
height, in logical units, of the font's character cell or character.

A logical font is the specification of the font one actually wants. The 
device here is the screen and the logical units for a screen are pixels.

For the CreateFont GDI function:
If the value of nHeight is, say, 20 then one is requesting a font height 
of 20 pixels.
If the value of nHeight is -20 then one is requesting a font size of 20 
pixels.

www.emdpi.com/fontsize.html

-- 
Richard Mason

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/