|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 | Next > |
|
|
[css3-fonts] Nested 'bolder' and 'lighter' questionThe spec isn't clear on what exactly happens here, so the CSSWG decided to ask web designers what they expect. So far I have two responses and they don't match. Anyone else have an opinion? :) fantasai wrote: > Given > > <a> > Text A > <b style="font-weight: bolder"> > Text B > <c style="font-weight: bolder"> > Text C > <d style="font-weight: lighter"> > Text D > </d> > </c> > </b> > </a> > > If you have three different weights in your font (normal, bold, > extra-bold) then > - Text A will be normal > - Text B will be bold > - Text C will be extra-bold > - Text D will be bold > > If you have only two weights in your font (normal, bold) then > - Text A will be normal > - Text B will be bold > - Text C will be bold > > What should Text D be? Bold or normal? I would say bold, if I were being so bold. -- Andy Clarke I say it goes to normal. -- Molly Holzschlag ~fantasai |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionfantasai wrote: > > The spec isn't clear on what exactly happens here, so the CSSWG > decided to ask web designers what they expect. So far I have two > responses and they don't match. Anyone else have an opinion? :) > > fantasai wrote: >> Given >> >> <a> >> Text A >> <b style="font-weight: bolder"> >> Text B >> <c style="font-weight: bolder"> >> Text C >> <d style="font-weight: lighter"> >> Text D >> </d> >> </c> >> </b> >> </a> >> >> If you have three different weights in your font (normal, bold, >> extra-bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be extra-bold >> - Text D will be bold >> >> If you have only two weights in your font (normal, bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be bold >> >> What should Text D be? Bold or normal? > > I would say bold, if I were being so bold. -- Andy Clarke > > I say it goes to normal. -- Molly Holzschlag Mathematically speaking, I think of it like this: normal = 0, bolder = +1, lighter = -1 So, bold values: A = 0, B = 1, C = 2, D = 1 D is bold, in both cases. With a two-weight font, it must be assumed that anything with a value greater than 0 must be bold, 0 or lower is normal. The assumption has to be that if the author wanted normal (0), s/he would have specified a reset, or normal. It's the reverse of this argument: <a>Text A <b style="font-weight: lighter">Text B (-1) <c style="font-weight: lighter">Text C (-2) <d style="font-weight: bolder">Text D (-1) </d> </c> </b> </a> D would have to be normal in this case, not bold. If no options existed for setting bold or normal, I would agree that bolder=bold and that lighter=normal, but since there are options for setting those values, I don't see how one can extrapolate any other meaning for the author than by using the math. Or am I missing something completely? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TheHolierGrail.com | MacNimble.com | Cyber-Sandbox.com | Anytowne.com Bill Brown, Web Developer - "From dot concept to dot com since 1999" "The intuitive mind is a sacred gift and the rational mind is a faithful servant. We have created a society that honors the servant and has forgotten the gift. -- Albert Einstein ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionFrom: "fantasai" <fantasai.lists@...>
Sent: Wednesday, August 27, 2008 8:23 PM To: <www-style@...> Subject: [css3-fonts] Nested 'bolder' and 'lighter' question > > The spec isn't clear on what exactly happens here, so the CSSWG > decided to ask web designers what they expect. So far I have two > responses and they don't match. Anyone else have an opinion? :) > > fantasai wrote: >> Given >> >> <a> >> Text A >> <b style="font-weight: bolder"> >> Text B >> <c style="font-weight: bolder"> >> Text C >> <d style="font-weight: lighter"> >> Text D >> </d> >> </c> >> </b> >> </a> >> >> If you have three different weights in your font (normal, bold, >> extra-bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be extra-bold >> - Text D will be bold >> >> If you have only two weights in your font (normal, bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be bold >> >> What should Text D be? Bold or normal? I would say "bold" because bolder should be the
same as opening a brace :
bolder { // Here we have bold
bolder { // Here we have
extra-bold, computed as bold which is the closest UI representation of
extra-bold
ligther { // Here we have bold
}
}
}
I've
another proposal. But I don't know if it's possible.I joined here some images to show my idea in action (I used the 'Arial' font but as if this font doesn't have any bold mode). My proposal is to do an outline (0.5px for
'bold' from normal or 'extra-bold' from 'bold', 0.75px for 'extra-bold' from
'normal') to emulate a bolder mode that's not supported by the
font.
Ligther than normal :
Normal :
Bold :
Extra-bold :
Extra-extra-bold :
> > I would say bold, if I were being so bold. -- Andy Clarke > > I say it goes to normal. -- Molly Holzschlag > > ~fantasai > > > > |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionOn Aug 27, 2008, at 11:23 AM, fantasai <fantasai.lists@...> wrote: > > The spec isn't clear on what exactly happens here, so the CSSWG > decided to ask web designers what they expect. So far I have two > responses and they don't match. Anyone else have an opinion? :) > > fantasai wrote: >> Given >> <a> >> Text A >> <b style="font-weight: bolder"> >> Text B >> <c style="font-weight: bolder"> >> Text C >> <d style="font-weight: lighter"> >> Text D >> </d> >> </c> >> </b> >> </a> >> If you have three different weights in your font (normal, bold, >> extra-bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be extra-bold >> - Text D will be bold >> If you have only two weights in your font (normal, bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be bold >> What should Text D be? Bold or normal? > > I would say bold, if I were being so bold. -- Andy Clarke > > I say it goes to normal. -- Molly Holzschlag > > ~fantasai This looks to me like a good reason not to use bolder and lighter. That said, it seems clear that the author intended the four weights in the four places listed first. The one that failed was the extrabold of C. That should not also cause the intended bold of D to fail too. The UA should not try to determine if D<C is more important to this particular author than D=B, but rather just limit the damage to C being not really bold enough. So I would say D=bold. |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionOn Aug 27, 2008, at 12:12 PM, François REMY <fremycompany_pub@...> wrote:
Good idea. But I would prefer some reasonable em measurement for the stroke instead of px, so that it scaled better. And some extra letterspacing to allow for the space taken up by the stroke. Bolder letters are normally wider too, so that should not be a problem.
|
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionfantasai <fantasai.lists@...> wrote: > The spec isn't clear on what exactly happens here, so the CSSWG > decided to ask web designers what they expect. So far I have two > responses and they don't match. Anyone else have an opinion? :) I talked this over with a friend who's a web designer, and we came up with, um, a proposal replacing all the rules for font-weight. It happens to make Text D bold in the case where there are only two weights in the font. It goes like this: - The effect of font-weight:bolder is to add 100 to the inherited value of font-weight; so normal/400 becomes 500, 500 becomes 600, and so on. - Similarly, font-weight:lighter subtracts 100 from the inherited value. - Actual font weights are assigned to font-weight numbers by packing them as closely as possible around normal/400. Thus, if your font has two weights (normal and bold) normal is used for 100-400 and bold is used for 500-900; if it has three weights (normal, bold, extra-bold), normal is 100-400, bold is 500, extra-bold is 600+; and if it has three weights (light, normal, bold), they would take 100-300, 400, 500-900 respectively. - We didn't discuss what happens if you apply "lighter" to an inherited value of 100, or "bolder" to an inherited value of 900. I can make a case for having them saturate or for having them just keep incrementing/decrementing but saying that all out-of-range values are equivalent to the limits. - It may be appropriate to also change font-weight:bold to be equivalent to font-weight:500. I'm not sure whether there are fonts out there with weights intermediate between what we usually call "normal" and "bold". Tangentially, I would add that whatever rules are adopted for font-weight:bolder/lighter, the WG should make sure to apply the same rules to font-stretch:wider/narrower. zw |
|
|
RE: [css3-fonts] Nested 'bolder' and 'lighter' question> > Given > > > > <a> > > Text A > > <b style="font-weight: bolder"> > > Text B > > <c style="font-weight: bolder"> > > Text C > > <d style="font-weight: lighter"> > > Text D > > </d> > > </c> > > </b> > > </a> > > > > If you have three different weights in your font (normal, bold, > > extra-bold) then > > - Text A will be normal > > - Text B will be bold > > - Text C will be extra-bold > > - Text D will be bold > > > > If you have only two weights in your font (normal, bold) then > > - Text A will be normal > > - Text B will be bold > > - Text C will be bold > > > > What should Text D be? Bold or normal >From CSS 2.1 15.6 Font boldness, I would have expected bold i.e. : Normal weight -> 100,200,300,400,500 Bold weight -> 600,700,800,900 Assuming a's font-weight is 400 then : b -> 700 c -> 800 d -> 700 Note that I am not necessarily saying this is the right way to do it or my own preference. But this is how I understand the specification's prose in this case. |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionZack Weinberg wrote: > > I talked this over with a friend who's a web designer, and we came up > with, um, a proposal replacing all the rules for font-weight. It > happens to make Text D bold in the case where there are only two > weights in the font. It goes like this: > > - The effect of font-weight:bolder is to add 100 to the inherited > value of font-weight; so normal/400 becomes 500, 500 becomes 600, > and so on. > - Similarly, font-weight:lighter subtracts 100 from the inherited > value. > > - Actual font weights are assigned to font-weight numbers by packing > them as closely as possible around normal/400. Thus, if your font > has two weights (normal and bold) normal is used for 100-400 and > bold is used for 500-900; if it has three weights (normal, bold, > extra-bold), normal is 100-400, bold is 500, extra-bold is 600+; > and if it has three weights (light, normal, bold), they would take > 100-300, 400, 500-900 respectively. > > - We didn't discuss what happens if you apply "lighter" to an > inherited value of 100, or "bolder" to an inherited value of 900. > I can make a case for having them saturate or for having them > just keep incrementing/decrementing but saying that all out-of-range > values are equivalent to the limits. > > - It may be appropriate to also change font-weight:bold to be > equivalent to font-weight:500. I'm not sure whether there > are fonts out there with weights intermediate between what we > usually call "normal" and "bold". Have you looked at what's spec'd currently? Because it's more sophisticated than mapping directly to numbers. It's just undefined for the nested 'bolder'/'lighter' case. > Tangentially, I would add that whatever rules are adopted for > font-weight:bolder/lighter, the WG should make sure to > apply the same rules to font-stretch:wider/narrower. Of course. ~fantasai |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionAt 12:47 -0700 27/08/08, Zack Weinberg wrote: >fantasai <fantasai.lists@...> wrote: >> The spec isn't clear on what exactly happens here, so the CSSWG >> decided to ask web designers what they expect. So far I have two >> responses and they don't match. Anyone else have an opinion? :) > >I talked this over with a friend who's a web designer, and we came up >with, um, a proposal replacing all the rules for font-weight. It >happens to make Text D bold in the case where there are only two >weights in the font. It goes like this: > > - The effect of font-weight:bolder is to add 100 to the inherited > value of font-weight; so normal/400 becomes 500, 500 becomes 600, > and so on. > - Similarly, font-weight:lighter subtracts 100 from the inherited > value. > > - Actual font weights are assigned to font-weight numbers by packing > them as closely as possible around normal/400. Thus, if your font > has two weights (normal and bold) normal is used for 100-400 and > bold is used for 500-900; if it has three weights (normal, bold, > extra-bold), normal is 100-400, bold is 500, extra-bold is 600+; > and if it has three weights (light, normal, bold), they would take > 100-300, 400, 500-900 respectively. > > - We didn't discuss what happens if you apply "lighter" to an > inherited value of 100, or "bolder" to an inherited value of 900. > I can make a case for having them saturate or for having them > just keep incrementing/decrementing but saying that all out-of-range > values are equivalent to the limits. > > - It may be appropriate to also change font-weight:bold to be > equivalent to font-weight:500. I'm not sure whether there > are fonts out there with weights intermediate between what we > usually call "normal" and "bold". yes, semi-bold does exist in some fonts. > >Tangentially, I would add that whatever rules are adopted for >font-weight:bolder/lighter, the WG should make sure to >apply the same rules to font-stretch:wider/narrower. I agree that we need to appeal to broader general principles to answer the question. The un-answerable question in the example is "is it more important to the designer/author that D be different from B or from C? That is, should it be normal (different from C) or bold (different from B)?" This cannot be answered. We have to look at more general principles about when values in general get 'clamped' to the implemented range, or rounded to the closest implemented value, and so on, as you have above. -- David Singer Apple/QuickTime |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionOn Wed, Aug 27, 2008 at 2:23 PM, fantasai <fantasai.lists@...> wrote: > fantasai wrote: >> >> Given >> >> <a> >> Text A >> <b style="font-weight: bolder"> >> Text B >> <c style="font-weight: bolder"> >> Text C >> <d style="font-weight: lighter"> >> Text D >> </d> >> </c> >> </b> >> </a> >> >> If you have three different weights in your font (normal, bold, >> extra-bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be extra-bold >> - Text D will be bold >> >> If you have only two weights in your font (normal, bold) then >> - Text A will be normal >> - Text B will be bold >> - Text C will be bold >> >> What should Text D be? Bold or normal? Well, if someone is using "bolder" n times in a row, they probably assume that there are at least n fonts bolder than the default one. So the intended effect is almost certainly the first case: normal, bold, extra-bold, bold. Otherwise, why would you have the second "bolder"? So the ideal behavior is clear. The problem is: what's the closest we can get to this ideal? One angle would be to say that the closest you could get is normal, bold, bold, bold. This is an obvious route. The problem is, then you're effectively ignoring two distinctions you were asked to make: two of the rules are no-ops. If you make it normal, bold, bold, normal, then only one of the rules is a no-op, which is in a way closer. To take this line of thought to an extreme, an even closer representation would be (assuming a "light" font exists) light, normal, bold, normal, which preserves all rules -- just shifted down. (But that's not really practical.) The question is one of intent, I think. What are some cases where this actually comes up? What sorts of semantics would most often dictate the use of nested bolder/lighter? I can't come up with an example that's not pretty contrived. |
|
|
RE: [css3-fonts] Nested 'bolder' and 'lighter' question> The question is one of intent, I think. What are some cases where > this actually comes up? What sorts of semantics would most often > dictate the use of nested bolder/lighter? I can't come up with an > example that's not pretty contrived. This, too has been bothering me. I've never seen (or imagined) a real-life use for this. This is why I suggested "normal" because nesting spans to achieve a visual result is a no-no in best practices. From a typographic point of view, the only way I could see a scenario like this playing out would be to apply color, not font weight. Imagine a paragraph that has three different font weights being used. It can easily become unreadable. FWIW, M -=- Molly E. Holzschlag Web Standards and Practices Education and Outreach Molly.Com, Inc. http://molly.com/ > -----Original Message----- > From: www-style-request@... [mailto:www-style-request@...] On > Behalf Of Simetrical > Sent: Wednesday, August 27, 2008 2:17 PM > To: fantasai > Cc: www-style@... > Subject: Re: [css3-fonts] Nested 'bolder' and 'lighter' question > > > On Wed, Aug 27, 2008 at 2:23 PM, fantasai > <fantasai.lists@...> wrote: > > fantasai wrote: > >> > >> Given > >> > >> <a> > >> Text A > >> <b style="font-weight: bolder"> > >> Text B > >> <c style="font-weight: bolder"> > >> Text C > >> <d style="font-weight: lighter"> > >> Text D > >> </d> > >> </c> > >> </b> > >> </a> > >> > >> If you have three different weights in your font (normal, bold, > >> extra-bold) then > >> - Text A will be normal > >> - Text B will be bold > >> - Text C will be extra-bold > >> - Text D will be bold > >> > >> If you have only two weights in your font (normal, bold) then > >> - Text A will be normal > >> - Text B will be bold > >> - Text C will be bold > >> > >> What should Text D be? Bold or normal? > > Well, if someone is using "bolder" n times in a row, they probably > assume that there are at least n fonts bolder than the default one. > So the intended effect is almost certainly the first case: normal, > bold, extra-bold, bold. Otherwise, why would you have the second > "bolder"? So the ideal behavior is clear. > > The problem is: what's the closest we can get to this ideal? One > angle would be to say that the closest you could get is normal, bold, > bold, bold. This is an obvious route. The problem is, then you're > effectively ignoring two distinctions you were asked to make: two of > the rules are no-ops. If you make it normal, bold, bold, normal, then > only one of the rules is a no-op, which is in a way closer. To take > this line of thought to an extreme, an even closer representation > would be (assuming a "light" font exists) light, normal, bold, normal, > which preserves all rules -- just shifted down. (But that's not > really practical.) > |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionfantasai <fantasai.lists@...> wrote: > Zack Weinberg wrote: > > - Actual font weights are assigned to font-weight numbers by > > packing them as closely as possible around normal/400. Thus, if > > your font has two weights (normal and bold) normal is used for > > 100-400 and bold is used for 500-900; if it has three weights > > (normal, bold, extra-bold), normal is 100-400, bold is 500, > > extra-bold is 600+; and if it has three weights (light, normal, > > bold), they would take 100-300, 400, 500-900 respectively. > > > > - It may be appropriate to also change font-weight:bold to be > > equivalent to font-weight:500. I'm not sure whether there > > are fonts out there with weights intermediate between what we > > usually call "normal" and "bold". > > Have you looked at what's spec'd currently? Because it's more > sophisticated than mapping directly to numbers. It's just undefined > for the nested 'bolder'/'lighter' case. Yeah, I have; I'm just not convinced it's better than the "pack them as closely as possible around 400" rule. The present wording is trying to fit all of these constraints simultaneously: 1. The "normal" and "bold" keywords map to fixed numeric weights. 2. Those fixed numeric weights correspond to the underlying font weights intended as the default and the simple boldface, respectively. (This requires that those numbers are more than 100 apart, because some fonts have intermediate weights.) 3. The "lighter" and "bolder" keywords, except possibly when "lighter" is nested inside "bolder" or vice versa (that being the undefined case you originally brought up), will always change the visible weight when there is another underlying font weight available in that direction. 4. The "lighter" and "bolder" keywords make a simple arithmetic change to the inherited numeric weight. (This isn't overtly in the wording but my web designer friend took it as a presupposition; from my implementor's perspective, anything else would be substantially more difficult, q.v. Moz bug 93725.) I think one of these will have to give in order to achieve defined behavior in all cases; I think #3 is the most important rule from the designer's perspective, and #4 from the implementor's; thus my proposal, which abandons #2 in some cases (when a font has weights bolder than "bold" but not intermediate between "normal" and "bold"). Unfortunately, I'd guess that this is a common case, and this is why I suggested changing "bold" to map to 500 instead of 700 - which would break normal/semibold/bold, but we can't have it both ways... zw |
|
|
RE: [css3-fonts] Nested 'bolder' and 'lighter' question> The question is one of intent, I think. What are some cases where
> this actually comes up? What sorts of semantics would most often > dictate the use of nested bolder/lighter? I can't come up with an > example that's not pretty contrived. It is contrived. Not only are the relative weights nested but the font has only two weights. So whichever value we will specify to be 'right' may match the author's intent only half the time... However unlikely in the real world, I believe the original question may have had two parts : what would you expect, and what does the spec say ? Given the rules it defines to assign numeric font weights and how bolder/lighter affect the property's value, I think it says D would be bold. |
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionOn 27 Aug 2008, at 8:23 pm, fantasai wrote:
> fantasai wrote: > >> What should Text D be? Bold or normal? > > I would say bold, if I were being so bold. -- Andy Clarke > > I say it goes to normal. -- Molly Holzschlag I vote with Molly. Use case: Text spans A, B, and C are all written by different authors (e.g. some kind of aggregated content), who happen to be called A, B and C. Text D is written by Author C B doesn't know A has made the container of his text bolder, and C doesn't know B has made the container of her text bolder Author C expects her content to be in a normal weight, and applies ‘lighter’ to some portion of that. Author C wants span containing text D to look different from the surrounding text. So it should go from Bold to Normal, regardless of the failure earlier of Author B to force C's text to be emboldened. In my belief this corresponds to the ascending and descending of ordered lists as defined in CSS2.1 — Nicholas Shanks. |
|
|
|
|
|
Re: [css3-fonts] Nested 'bolder' and 'lighter' questionby |