On Tue, Jun 24, 2014 at 12:05 AM, Cameron McCormack <c...@mcc.id.au> wrote: > On 24/06/14 16:30, Jonas Sicking wrote: >> >> I don't understand why anyone would want to key gets and sets using >> FontFace instances. I.e. why would you want to ever call >> fontFaceSet.has(myFontFace). That returning false doesn't really tell >> you anything about what fonts are or are not loaded. > > It tells you whether they're available to the document, though. (But true > enough I'm not sure how often one would need to do that.)
It tells you whether that exact FontFace instance is in the document. It doesn't tell you if another FontFace object with exactly the same properties is or not. Where would you get a relevant FontFace instance to pass to this function? Seems like you'd would have either gotten it from the fontfaceset, or you created it in the past to add it to the fontfaceset. > The alternative I suppose is to have document.fonts be keyed on families, > and their values would be a set of faces. But I think the current design of > exposing a flat set of faces works well enough. I don't really know what the use cases are for manipulating the list of fonts is. The obvious ones are "add this FontFace object" and "is there a fontface loaded which meets requirement X". But I don't know what requirements X usually are. And how much of that the .check() function already covers. But yes, I suspect that simply making it possible to iterate the list of font faces and then having a .add(FontFace) and .delete(FontFace) might be enough as a start. >> Either way, these are the things that would be great to sort out. >> Right now it feels to me like everyone is acting like the spec is >> done, when in fact a good chunk of the API surface is still missing. > > As I said, I'll write to www-style with what I end up feeling works. But if > you feel like the design should differ markedly from "add/has/delete methods > that take FontFaces, and an iterator to get at them", feel free to start a > thread on www-style. Sorry, I really won't have time to carry this one forward. I've tried to poke Tab a couple of times about this but haven't gotten much interest. / Jonas _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform