W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [css-font-loading] 'family' should be 'fontFamily', to prevent API fragmentation

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 7 Sep 2015 09:45:11 +0900
Message-ID: <CALYZoVM-EKxzSudLo68sVuzJdNzEAVvzjPEusPMSJRFdaOXDew@mail.gmail.com>
To: Mike Kamermans <nihongo@gmail.com>
Cc: www-style <www-style@w3.org>
Mike Kamermans wrote:

> I'm trying out the new font loading API, but noticed that counter to
> pre-exiting APIs, the font family property of the FontFace object is
> called "family", not "fontFamily". This should probably be changed, as
> it bakes confusion into the various APIs for working with fonts.

Within a style object, prefixing 'font' on these properties helps
distinguish them as "properties that apply to fonts". No such
distinction is needed for descriptors within an @font-face rule. I guess
we could go back to prepending 'font' onto everything and strictly
mimic the camel casing rules for style properties. These aren't
style properties though, they are descriptors and don't work the same
way nor do they parse the same way. The value for the 'font-family'
descriptor is single-valued for example, not a list of family names.


John Daggett
Mozilla Japan
Received on Monday, 7 September 2015 00:45:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:56 UTC