Skip to content

[css-fonts-4] Installed font aliasing #5819

Closed
@gsnedders

Description

@gsnedders

The font matching algorithm contains:

For other family names, the user agent attempts to find the family name among fonts defined via @font-face rules and then among available installed fonts, matching names with a § 5.1 Localized name matching as outlined in the section above.

Where § 5.1 says:

Some font file formats allow font faces to carry multiple localizations of a particular string (e.g. family name or named instance). User agents must recognize and correctly match all of these names independent of the underlying platform localization, system API used, or document encoding.

This arguably doesn't match reality; for example fontconfig aliases various metric compatible families, which means that requesting "Helvetica" on most systems using fontconfig will find a font matching Helvetica, even though it's not any of the names that the font file format carries (e.g., here it will find Nimbus Sans).

I can see an argument that because it's a lower layer implementing this matching that it's conforming, whereas if the aliasing was done within the browser itself it wouldn't be conforming.

Regardless, we should probably take an explicit stance here (and that stance should probably be that this is conforming, given I don't see systems practically moving away from this).

To note: this came out from me trying to re-triage long-abandoned WebKit bugs, specifically from https://bugs.webkit.org/show_bug.cgi?id=6686 questioning whether "Garamond" should match either of "Apple Garamond BT" or "Adobe Garamond".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions