W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2013

[whatwg] font security on measureText

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 2 May 2013 14:36:14 -0700
Message-ID: <CAGN7qDD2WOhpnE0dPvyqZifDURk27A=WoUesen+k02KhSAJ1sw@mail.gmail.com>
To: whatwg@whatwg.org, public-canvas-api@w3.org
The canvas 2d spec currently states that a font has to be local in order
for measureText to work: [1][2]

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.


Does anyone know what this is? It seems to us, that if the font is
available to CSS (depending on if the browser supports CORS for fonts), it
should be fine to call measureText.

1:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-measuretext
2: http://www.w3.org/TR/2dcontext/#dom-context-2d-measuretext
Received on Thursday, 2 May 2013 21:36:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:58 UTC