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: 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.   
Still need to add .otf versions of the lps/fonts directory.

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.  Only  
increment sizecache counter when a new 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.

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

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

Reply via email to