- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Fri, 07 Jun 2019 12:59:38 +0000
- To: public-houdini-archive@w3.org
flackr has just created a new issue for https://github.com/w3c/css-houdini-drafts:
== [css-typed-om] CSSFontFace value ==
Currently [PaintRenderingContext2D](https://www.w3.org/TR/css-paint-api-1/#2d-rendering-context) (i.e. PaintWorklet) doesn't implement the [CanvasText](https://html.spec.whatwg.org/multipage/canvas.html#canvastext) interface. My understanding is one reason is due to not being able to resolve fonts on the worklet context.
I propose we add an opaque type which would ideally allow capturing the 'font' style and provide a resolved font to the worklet. e.g.
```js
registerPaint('foo', class {
static get inputProperties() { return ['color', 'font']; }
paint(ctx, geom, styleMap) {
ctx.fillStyle = styleMap.get('color').toString();
ctx.font = styleMap.get('font');
ctx.fillText('foo', 0, 0);
}
});
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/899 using your GitHub account
Received on Friday, 7 June 2019 12:59:40 UTC