-
Notifications
You must be signed in to change notification settings - Fork 711
[css-fonts-4] font-stretch is unfortunately named #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
One possibility: |
I agree that this name has, in practice, caused confusion. In a world where fake bold and fake italic (obliquing) are common, people often assume that font-stretch geometrically stretches or shrinks the glyph outlines. Also, to date there were not so many WebFonts deployed with condensed or expanded versions, so this property and associated descriptor were not much used. I agree that now is the right time to deploy an alias, before variable fonts make condensed and expanded forms far more common. Also, mea culpa. I came up with the name |
On Thu, 2016-09-29 at 12:09 -0700, Chris Lilley wrote:
Which in at least on implementation I use, it does. And it's a useful Maybe access to the font transformation matrix should be added at the Liam Liam R. E. Quin liam@w3.org |
Totally agree, |
If we wanted to make |
|
@Crissov I think the challenge is being mindful of terminology from type design and typography while still being accurate. In this case, I'm not sure that this is a clear-cut recommendation one way or the other, but in balance I've heard from a whole bunch of type designers/typographers that they feel |
There are lots of unfortunate naming choices in CSS (e.g. Similar changes I could imagine:
|
You hit the nail on the head. Closing. |
If the idea of |
Another thought on @Crissov’s comments …
The main difference with most of the other unfortunate naming choices is that Between this and the expansion of functionality with variable fonts I mentioned before, I really hope this is enough to convince @litherum to open this issue up again. It seems much more logical to improve the naming for a thing that still hasn't been implemented than it would be to have to explain to confused developers and designers for the rest of time that |
On Tue, 2016-12-06 at 14:05 -0800, Nick Sherman wrote:
The main difference with most of the other unfortunate naming choices
is that `font-stretch` support still hasn't been widely implemented
(if at all).
AntennaHouse Formatter implements it, synthesizing a font of the
appropriate width if necessary.
I think YesLogic's PrinceXML also implements it, but does not seem to
synthesize a font if needed.
The CSS font model doesn't seem to let you say, "I want _this_ font
with _this_ transformation done to it" except for very limited cases -
the renderer will synthesize a font that renders in blue if needed, or
that has underlines, or is slanted, but you can't take the slanted font
and unslant it, or the condensed font and expand it. Nor I think can
you choose the first font family from a list where roman, italic, roman
small caps, discretionary ligatures and historical ligatures are all
present. I still sometimes see Times Roman "fi" ligatures on a page
using Helvetica.
But the fix isn't to rename font-stretch. It might be to add an @font-
family or something, I'm not sure.
|
MDN has updated the opening paragraph of their summary of |
I agree that this is a confusing term and that font-width would be a much more accurate term. Especially as OT 1.8 Variable Font support increases, a logical name will be crucial for understanding what this property actually does. It refers to the width of a font and does not refer to mechanically stretching a font, therefore font-width is much more accurate. Please change the name to font-width. |
Font-width would definitely be more appropriate, as well as being more in keeping with other CSS terms, e.g. border-width (increasing border width & font-width would have a similar visual effect) |
I think |
On Mon, 2017-02-27 at 14:55 -0800, CJ Dunn wrote:
[...] It refers to the width of a font and does not refer to
mechanically stretching a font,
I do know of at least one implementation that synthesizes a font of the
given "stretch" if needed. But then, this also happens for bold and
italic or oblique.
|
@liamquin Hmm. I'm referring to what Mozilla says about this property:
|
@chrisarmstrong No. An example of weight would be Light, Bold, Black. An example of Width would be Extra Compressed, Condensed, Wide. Specific font examples: See: |
@cjdunn yep I meant this bit can also refer to font-weight:
Either way my question doesn't add much to the discussion so I'll remove it, however your answer should be useful to others :) |
I think I would prefer pretty much anything over |
Yes to |
I wonder if we need a more flexible model to account for complex font families. The Adobe Kepler family has 168 members, with a facet of optical weight (subhead | display | caption | regular) in addition to font-weight, font-stretch, and font-style. Knockout has nine weights ranging from "flyweight" to "sumo", and four widths, with naming utterly unrelated to existing CSS values. |
I don't think a more flexible model is necessary. Optical weight is more about use cases (i.e., is it being used for an h1 and so very large, etc.) and so is natural to set as a separate family. And you can specify weight numerically (100–900), which already covers the 9 weights of the Knockout example. But font-width is a perfect addition to add robustness. |
I think |
With regard to @denmch 's comment - It's worth noting that optical weight already has another named axis of variation within the variable font world that is more about x-height proportion that 'visual weight' per se. I'm glad there's more discussion regarding |
Every browser other than WebKit has already shipped Everyone agrees that The variations piece of Are there any other proposals of how to handle this unfortunate naming choice? |
@drott any comments on the proposal given that the majority of existing |
While I agree that the mismatch between name and axis in variable axis is unfortunate, I don't think it's a good use of time and energy to work on a deprecation only for the purpose of a rename with no functional change for a feature that's actively in popular use. If no full deprecation is planned, long term, I don't think we're helped much with an alias. With regards to the axis mismatch, I don't see this as a major problem. It's by the way perhaps worse for I agree with your own argument, @svgeesus that it clutters the CSS OM and introduces a bit of confusion and requires additional rules how to resolve alias vs. underlying property. No objections to
adding extra explanations to the wording being sub-optimal and historical. |
As @rviscomi pointed out, 99.6% of usage is, redundantly, setting it to the initial value. So it isn't actively in popular use to actually do something. |
I'd say that it's quite widely used in print stylesheets, e.g. with AntennaHouseFormatter, which DOES use font-stretch to stretch the font - more precisely i think as with font style, and weight, it chooses a matching font if there is one and synthesizes one if there isn't. I don't really see why you want font-stretch to behave differently in that regard. And it's actually technically easier than synthesizing small caps, italics, bold. When i tried in PrinceXML, i found that the software behaved as if it had stretched the font, but font selection then failed in the resulting PDF. I don't recall testing in Weasyprint or PDFReactor. You aren't going to be able to measure the prevalence of something in off-web stylesheets by looking at Web statistics, unfortunately. |
@liamquin I may not be reading that correctly so correct me if I’m wrong here: Do these tools synthesize stretched styles? If so that behavior does not adhere to the font-stretch spec.
This proposal will not take away the font-stretch property, it will create a more accurate name. “Stretching” implies a scale transformation of the outlines. That is not what the |
@scottkellum yes, there are implementations that can synthesize font-stretch (or could when i checked some time in the past 5 years), just as they could synthesize bold and italic. I'm aware it doesn't meet the spec. I don't imagine that renaming it to font-width will change this; you can do font-style: italic, and get a fake italic, so it's pretty absurd that setting font-width when the requested width isn't available can't make a faux condensed (regardless of how ugly it might look). I agree it's not what the spec says. When the spec differs from what implementations do, and from what users expect, there's always the possibility of changing the spec to conform to expectations and to implementations. This confusion in CSS between font creation/distortion and font selection has always been a problem. |
|
What about changing |
I don't think we should be changing the behavior of the existing property. That would have potentially unexpected effects on existing content. What we could consider, I think, is introducing a new |
The CSS Working Group just discussed
The full IRC log of that discussion<frances> Alan: Next issue is on the name of font stretch<frances> font-stretch* <frances> Johnathan: font-stretch should be font-width, would be a better name. Has been this way for a long time, possibly alias the property and use something they understand better. <florian> q+ <frances> Alan: You mention font-synthesis-width? <astearns> ack florian <jensimmons> q+ <frances> Johnathan: Would be different to synthesize, might need to control the behavior. Something suggested to change, but need to alias because would not be backwards compatable <astearns> ack jensimmons <frances> Florian: There are different ways to do aliasing, such as legacy aliasing, we should go. <fantasai> https://www.w3.org/TR/css-cascade/#aliasing <frances> Jen: I also support this, not something we typically do, can't keep making different changes. Words are meaningful and in adjoining industries, it should just be font-width <florian> s/such as legacy aliasing, we should go./and the relevant one here is "legacy name aliasing", as defined in css-cascade <frances> Alan: Add font-width, and make font-stretch a legacy alias for the font description. Issue of expecting what font-stretch should do for another issue <frances> fantasai: Pretty close to what you are supposed to do. <fantasai> s/to do/to do for properties per spec/ <frances> PROPOSAL: Add font-width property and descriptor and make font-stretch a legacy alias of those <frances> Alan: Any objections? Resolved. <frances> RESOLVED: Add font-width property and descriptor and make font-stretch a legacy alias |
Good; but also these three need to be copied, renamed and edited to test
|
Most designers' intuition seems to be that this property affects (the typographical sin of) geometrical scaling. We should make an alias which has a better name.
The text was updated successfully, but these errors were encountered: