[csswg-drafts] [css-fonts] Define `<family-name>` and `<font-face-name>` with a basic syntax (#8092)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts] Define `<family-name>` and `<font-face-name>` with a basic syntax ==
Would it be possible to define [`<family-name>`](https://drafts.csswg.org/css-fonts-4/#family-name-value) and [`<font-face-name>`](https://drafts.csswg.org/css-fonts-4/#local-font-fallback) with a basic syntax? 

It would help to clarify their grammars.

---

`<family-name>` is included in the value definition of `font-family` (descriptor or property), and is defined in prose with:

  > 2.1.1. Syntax of `<family-name>`
  >
  > Font family names other than generic families must either be given quoted as `<string>`s, or unquoted as a sequence of one or more `<custom-ident>`.

Is it equivalent to `[<custom-ident>+ | <string>]#`? 

In my opinion, the basic syntax is clearer. For example, the above prose does not define that names should be comma-separated, and it is not clear on whether `<string>`s and sequences of one or more `<ident>`s are mutually exclusive.

---

`<font-face-name>` is included in the value definition of `src` (descriptor).

  > The locally-installed `<font-face-name>` argument to `local()` is a format-specific string that uniquely identifies a single font face within a larger family. The name can optionally be enclosed in quotes. If unquoted, the unquoted font family name processing conventions apply; the name must be a sequence of identifiers separated by whitespace which is converted to a string by joining the identifiers together separated by a single space.

Is it equivalent to `<custom-ident>+ | <string>`? Ie. the same requirements than `<font-family-name>` must apply, isn't it?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8092 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 17 November 2022 11:17:18 UTC