|
|
|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98
Dynamic Fonts
Unfortunately, as shown in the three previous chapters, although both Netscape and Microsoft offer downloadable font technologyenabling Web page designers to ensure that their users will have access to the fonts needed to view the true designtheir two systems are incompatible. However, using the same techniques of browser detection and conditional HTML code generation discussed in the previous sections, it is possible to create a Web page that includes custom fonts and will work in version 4 and higher of either browser.
- See Dynamic Fonts, p. 598.
FIGURE 27.8 The Cross-Browser Dynamic HTML library gives you an easy way to change the content of a Web page dynamically in either browser.
FIGURE 27.9 Responding to mouse events and other Web browser events can be done in either browser when programmed correctly.
To accomplish this, you would follow the following steps:
- 1. Design your page(s) once, using the font or fonts that you wish to use in the final version to be delivered via the Web.
- 2. Use Microsofts Web Embedding Font Tool (WEFT) to create a version of the font suitable for download over the Web using its OpenType font technology.
- 3. Use a third-party product such as Hexmac Typographic 2.0 to prepare a version of the font in the Bitstream TrueDoc font format supported by Netscape Navigator.
- 4. Finally, use conditional code generation techniques to write out the appropriate code for each browser, either the font-face src style sheet attribute for Internet Explorer, or an appropriate <LINK> tag for Netscape Navigator.
CAUTION:
Remember that not all fonts are in the public domain or licensed to be included as downloadable fonts in your Web documents. Make sure that you use only properly licensed or public domain fonts for this purpose, or you may find yourself with some legal problems.
Resources on the Web
A great many resources on the Web can give you more information, examples, and tips on programming CBDHTML pages. The following are some of the ones to which you can refer (and most of these sites maintain lists of links to other resources):
- Netscapes DevEdge OnlineThe main Web site is located at http://developer.netscape.com/tech/index.html. To go right to the section on Dynamic HTML, try http://developer.netscape.com/tech/dynhtml/index.html.
In addition to its Web-based resources, Netscape maintains a Cross-Browser Dynamic HTML mailing list. To join this list, send email to xbrowser@netscape.com, and in the subject of the message type subscribeyour_email_address.
- Mike Halls Cross-Browser Dynamic HTML LibraryHis Web site is located at http://members.aol.com/MHall75819/index.html, and the library can be found at http://members.aol.com/MHall75819/dhtml/cbdhtml.html.
- The Dynamic Duo Cross-Browser Dynamic HTMLThis collection of functions and techniques supporting cross-browser deployment of Dynamic HTML documents can be found at http://www.dansteinman.com/dynduo/.
- Active Layers APIThe Active Layers API can be downloaded from http://www.alapi.com/lite2/.
- Macromedias Dynamic HTML ZoneMacromedia maintains a Web site devoted to Dynamic HTML, part of which naturally promotes its own Shockwave technology as a natural means of achieving cross-browser compatible effects, along with Dynamic HTML. The Dynamic HTML Zone is located at http://www.dhtmlzone.com/index.html. They have an article on cross-browser compatibility issues at http://www.dhtmlzone.com/articles/dhtml.html.
- C|Nets Builder.comThe C|Net Builder.com site hosts a variety of information and products devoted to all the different Web technologies. The Builder.com site is at http://www.builder.com/ and its Dynamic HTML section can be found at http://www.builder.com/Authoring/Dhtml/.
|