This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
+++ This bug was initially created as a clone of Bug #21943 +++ The canvas 2d spec currently states that a font has to be local in order for measureText to work: If doing these measurements requires using a font that has an origin that is not the same as that of the Document object that owns the canvas element (even if "using a font" means just checking if that font has a particular glyph in it before falling back to another font), then the method must throw a SecurityError exception. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-measuretext http://www.w3.org/TR/2dcontext/#dom-context-2d-measuretext After a small discussion on the mailing list, we agreed that the spec should not have this text. Instead it should be silent and rely on the general font loading algorithm that CSS specifies.
It definitely shouldn't be silent, but if the font loading infrastructure elsewhere in the platform defines this better, then yeah, we should just have a non-normative note here instead. In any case, it should be the same text as we use elsewhere in the HTML spec for using fonts. Where is font loading defined? (i.e. what can we rely on to make this just work?)
> Where is font loading defined? (i.e. what can we rely on to make this just > work?) I'm unsure. From the discussion, it sounds like Anne is going to define this. http://dev.w3.org/csswg/css-fonts/#same-origin-restriction was also mentioned but I'm unclear if that will be the official definition.
https://lists.w3.org/Archives/Public/public-canvas-api/2013AprJun/0000.html