Pro HTML5 and CSS3 Design Patterns

(avery) #1

CHAPTER 10 ■ STYLING TEXT


Text Replacement with Canvas and VML


Example shown with text replaced

HTML


<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="cufon-yui.js" type="text/javascript"></script>
<script src="Myriad_Pro_400.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h2', { fontFamily: 'Myriad Pro' });
</script>
</head>
<body>
<h1>Test Replacement with VML and canvas</h1>
<h2>Heading 2</h2>
</body>
</html>
Free download pdf