Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>src local on load fallback</title> |
michael@0 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
michael@0 | 6 | |
michael@0 | 7 | <style type="text/css"> |
michael@0 | 8 | |
michael@0 | 9 | body { |
michael@0 | 10 | margin: 50px; |
michael@0 | 11 | font-size: 24pt; |
michael@0 | 12 | font-family: sans-serif; |
michael@0 | 13 | } |
michael@0 | 14 | |
michael@0 | 15 | p { margin-left: 1em; } |
michael@0 | 16 | |
michael@0 | 17 | @font-face { |
michael@0 | 18 | font-family: test0; |
michael@0 | 19 | src: local("Futura-Medium"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("DejaVu Sans"), local("Arial"); |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | @font-face { |
michael@0 | 23 | font-family: test1; |
michael@0 | 24 | src: url(bogus-dir/bogus.ttf), local("Futura-Medium"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("DejaVu Sans"), local("Arial"); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | @font-face { |
michael@0 | 28 | font-family: test2; |
michael@0 | 29 | src: url(../fonts/README), local("Futura-Medium"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("DejaVu Sans"), local("Arial"); |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | @font-face { |
michael@0 | 33 | font-family: test3; |
michael@0 | 34 | src: url(../fonts/README), local("Bogosity"), local("Futura-Medium"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("DejaVu Sans"), local("Arial"); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | @font-face { |
michael@0 | 38 | font-family: test4; |
michael@0 | 39 | src: url(../fonts/README), local("Bogosity"), url(bogus-dir/bogus.ttf), local("Futura-Medium"), local("Bitstream Vera Sans"), local("Bitstream Vera Sans Roman"), local("DejaVu Sans"), local("Arial"); |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | #test0 { font-family: test0, serif; } |
michael@0 | 43 | #test1 { font-family: test1, serif; } |
michael@0 | 44 | #test2 { font-family: test2, serif; } |
michael@0 | 45 | #test3 { font-family: test3, serif; } |
michael@0 | 46 | #test4 { font-family: test4, serif; } |
michael@0 | 47 | |
michael@0 | 48 | </style> |
michael@0 | 49 | |
michael@0 | 50 | <script type="text/javascript"> |
michael@0 | 51 | |
michael@0 | 52 | </script> |
michael@0 | 53 | |
michael@0 | 54 | </head> |
michael@0 | 55 | <body> |
michael@0 | 56 | |
michael@0 | 57 | <h4>These should appear in sans-serif face, not serif:</h4> |
michael@0 | 58 | |
michael@0 | 59 | <p id="test0">Simple use of src local()</p> |
michael@0 | 60 | |
michael@0 | 61 | <p id="test1">The URL for the font data is bogus</p> |
michael@0 | 62 | |
michael@0 | 63 | <p id="test2">The URL exists but does not return font data</p> |
michael@0 | 64 | |
michael@0 | 65 | <p id="test3">Same as above, but first local not found</p> |
michael@0 | 66 | |
michael@0 | 67 | <p id="test4">Same as above, bogus url follows unknown local font</p> |
michael@0 | 68 | |
michael@0 | 69 | </body> |
michael@0 | 70 | </html> |