Change 20090927-maxcarlson-T by [email protected] on 2009-09-27 00:44:20 PDT in /Users/maxcarlson/openlaszlo/trunk-clean for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: UPDATED AGAIN: Add preliminary @font-face support to DHTML New Features: DHTML font embedding Bugs Fixed: LPP-8313 - Support for downloadable fonts in DHTML (@font- face inclusion of OpenType or TTF fonts) Technical Reviewer: ptw QA Reviewer: [email protected] Documentation: DHTML now supports Truetype font embedding for browsers that support it. Be sure to include an .otf version of the font alongside the .ttf for support in IE. Release Notes: DHTML now supports Truetype font embedding for browsers that support it. Details: This update now handles font includes from the default lps/ fonts directory, detects when the font is loaded so it can automatically resize, and attempts to include .otf fonts for IE. Add .otf versions of the lps/fonts directory. Testcase now works in IE! LzFontManager - Add implementation of LzFontManager. LzSprite - Write CSS during canvas sprite initialization, to guarantee approot has been set and sprite paths can be correctly determined. Create text measurement div ahead of time to save tests in LzTextSprite. Simplify getBaseUrl(). LzTextSprite - Move text measurement divs creation from getTextDimension() into new __createMeasureDiv() method. Increment sizecache counter whenever a new measurement div is created. Add initted flag that's set after __initTextProperties() is complete. Add __isExternalFontLoaded() method that checks if the current font is externally loaded, and if so attempts to measure a string, waiting until the size changes - indicating the external font finished loaded. Track sprites that are loading external fonts so they can update their size when the font finishes loading. __updatefieldsize() returns early if an external font is currently loading. Add shared __clearMeasureCache() method to clear text measurement cache. Library - Include LzFontManager. DHTMLWriter - Use a StringBuffer to accumulate scripts, instead of a PrintWriter. Avoid converting to strings wherever possible to reduce memory footprint. Prepend resource table to the front of the generated script to guarantee fonts are all available before canvas init time. Tests: See LPP-8313. Testcase loads the font, and once the external font finishes loading, the textfields resize. test/lztest/lztest- textheight.lzx?lzr=dhtml runs as before. Files: A WEB-INF/lps/lfc/kernel/dhtml/LzFontManager.js M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js M WEB-INF/lps/lfc/kernel/dhtml/Library.lzs M WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java A lps/fonts/helmetbi.eot A lps/fonts/mono-7-bold-regular-s.eot A lps/fonts/ceriph-7-bold-regular-s.eot A lps/fonts/ariosob.eot A lps/fonts/helmetr.eot A lps/fonts/kroeger-5-plain-condensed.eot A lps/fonts/lztahoeplus8b.eot A lps/fonts/header-8-bold-condensed-s.eot A lps/fonts/ceriph-5-plain-regular-s.eot A lps/fonts/kroeger-5-bold-regular-s.eot A lps/fonts/ceriph-7-plain-regular-s.eot A lps/fonts/ariosor.eot A lps/fonts/ceriph-7-plain-regular.eot A lps/fonts/copy-8-plain-regular.eot A lps/fonts/hooge-5-bold-regular-s.eot A lps/fonts/helmetcb.eot A lps/fonts/timmonsb.eot A lps/fonts/header-17-bold-condensed-s.eot A lps/fonts/copy-8-bold-regular-s.eot A lps/fonts/lztahoe8b.eot A lps/fonts/kroeger-6-plain-regular.eot A lps/fonts/timmonsbi.eot A lps/fonts/lzsans8.eot A lps/fonts/helmetcr.eot A lps/fonts/hooge-5-bold-expanded-s.eot A lps/fonts/standard-7-bold-expanded.eot A lps/fonts/timmonsr.eot A lps/fonts/header-8-bold-regular-s.eot A lps/fonts/header-8-bold-regular.eot A lps/fonts/kroeger-4-bold-regular.eot A lps/fonts/standard-9-bold-regular-s.eot A lps/fonts/kroeger-5-plain-expanded.eot A lps/fonts/mono-7-bold-regular.eot A lps/fonts/hooge-5-plain-expanded-s.eot A lps/fonts/hooge-5-plain-expanded.eot A lps/fonts/hooge-4-plain-regular-s.eot A lps/fonts/hooge-4-plain-regular.eot A lps/fonts/lztahoeplus8.eot A lps/fonts/kroeger-5-bold-expanded.eot A lps/fonts/standard-7-plain-regular-s.eot A lps/fonts/hooge-6-plain-regular-s.eot A lps/fonts/standard-9-plain-regular.eot A lps/fonts/standard-9-plain-regular-s.eot A lps/fonts/mono-7-plain-regular.eot A lps/fonts/kroeger-5-bold-regular.eot A lps/fonts/lzsansplus8i.eot A lps/fonts/copy-8-plain-regular-s.eot A lps/fonts/kroeger-5-plain-regular-s.eot A lps/fonts/ceriph-5-plain-expanded.eot A lps/fonts/hooge-5-plain-condensed.eot A lps/fonts/lzsans8i.eot A lps/fonts/hooge-4-bold-regular.eot A lps/fonts/ceriph-5-bold-expanded-s.eot A lps/fonts/standard-7-bold-regular-s.eot A lps/fonts/stan0751.eot A lps/fonts/uni-5-plain-expanded.eot A lps/fonts/helmeti.eot A lps/fonts/kroeger-5-plain-expanded-s.eot A lps/fonts/helmetcbi.eot A lps/fonts/hooge-5-plain-regular.eot A lps/fonts/lzsansplus8.eot A lps/fonts/italic-8-plain-regular-s.eot A lps/fonts/italic-8-plain-regular.eot A lps/fonts/lztahoeplus8i.eot A lps/fonts/ceriph-5-plain-regular.eot A lps/fonts/hooge-5-bold-regular.eot A lps/fonts/helmetci.eot A lps/fonts/standard-7-plain-expanded.eot A lps/fonts/copy-8-bold-regular.eot A lps/fonts/kroeger-4-plain-regular.eot A lps/fonts/timmonsi.eot A lps/fonts/ceriph-5-plain-expanded-s.eot A lps/fonts/standard-7-plain-condensed-s.eot A lps/fonts/lztahoe8i.eot A lps/fonts/standard-7-bold-expanded-s.eot A lps/fonts/kroeger-4-bold-regular-s.eot A lps/fonts/hooge-4-bold-regular-s.eot A lps/fonts/standard-7-bold-regular.eot A lps/fonts/congab.eot A lps/fonts/ceriph-7-bold-regular.eot A lps/fonts/kroeger-5-plain-condensed-s.eot A lps/fonts/hooge-5-plain-regular-s.eot A lps/fonts/hooge-6-plain-regular.eot A lps/fonts/kroeger-5-bold-expanded-s.eot A lps/fonts/standard-7-plain-regular.eot A lps/fonts/lzsansplus8b.eot A lps/fonts/congar.eot A lps/fonts/header-8-bold-condensed.eot A lps/fonts/mono-7-plain-regular-s.eot A lps/fonts/header-17-bold-condensed.eot A lps/fonts/chevarar.eot A lps/fonts/standard-7-plain-expanded-s.eot A lps/fonts/lztahoe8.eot A lps/fonts/kroeger-4-plain-regular-s.eot A lps/fonts/kroeger-5-plain-regular.eot A lps/fonts/kroeger-6-plain-regular-s.eot A lps/fonts/hooge-5-plain-condensed-s.eot A lps/fonts/lzsans8b.eot A lps/fonts/standard-7-plain-condensed.eot A lps/fonts/hooge-5-bold-expanded.eot A lps/fonts/chevaraor.eot A lps/fonts/ceriph-5-bold-expanded.eot A lps/fonts/helmetb.eot A lps/fonts/stan0752.eot A lps/fonts/standard-9-bold-regular.eot A lps/fonts/uni-5-plain-expanded-s.eot Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090927-maxcarlson-T.tar _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
