Loading...

This presentation is an HTML5 website

Press key to advance.

Having issues seeing the presentation? Read the disclaimer

Slides controls
  • and to move around.
  • Ctrl/Command and + or - to zoom in and out if slides don’t fit.
  • S to view page source.
  • T to change the theme.
  • H to toggle syntax highlight.
  • N to toggle speaker notes.
  • 3 to toggle 3D effect.
  • 0 to toggle help.

Enjoy WebFonts!!

Sadaaki HIRAI

Chrome+HTML5 Conference
2011/08/21

Profile

WebFonts

Live Coding with Zen-Coding


Powered by Zen Coding

see also Saving generated files on the client-side - HTML5Rocks Updates

WebFonts && Canvas


var ctx = document.getElementById("canvas-area").getContext("2d");
ctx.textAlign    = "center";
ctx.textBaseline = "middle";
document.getElementById("canvas-draw1").addEventListener("click", function(event) {
  ctx.fillStyle = "red";
  ctx.font = "72px 'Monofett', cursive";
  ctx.fillText("WebFonts", 400 , 50);
});

WebFonts && Canvas Effects

see also HTML5 Rocks - Typographic effects in canvas

WebFonts && SVG

Chrome+HTML5 Conference
<g id="gtext" fill="#009900">
    <text x="10" y="10" font-size="56" font-family="Monofett">
    <textPath xlink:href="#circlePath">Chrome+HTML5 Conference</textPath>
    </text>
</g>

see also スタートアップ SVG:第3回 少し高度なSVG|gihyo.jp … 技術評論社

まとめ

Enjoy WebFonts!!