Shouldn't fonts embedded through @font-face be available in <canvas>?
"Adam Twardoch (List)" <[email protected]>
| Newsgroups | gmane.comp.web.fonts,gmane.comp.web.css.general |
|---|---|
| Organization | Adam Twardoch |
| Message-ID | <[email protected]> |
I just tested, and none of the implementations (Webkit, Firefox, Opera)
of <canvas> allows the use of fonts embedded through @font-face to be
used within HTML canvas.
I was hoping that something like that would work:
<style type="text/css">
@font-face { font-family: "EnglSchr";
src:url("fonts/EnglSchr.ttf"); }
<canvas id="canvas" width="600" height="300"></canvas>
<script language="javascript">
var ctx = $('#canvas')[0].getContext("2d");
ctx.font = "20pt EnglSchr";
ctx.fillText("Hello World!", 10, 50);
</script>
but it does not. A pity, because that would be very useful. Can you guys
forward the appropriate feature request?
Best,
Adam