I've changed it to use all one capability, "advancedfonts".
As for performance -- I ran the test/lfc/perf/text.lzx and test/lfc/
perf/textperformance.lzx, and learned that having it be "advanced" by
default makes it a little slower on element creation, viz.:
test/lfc/perf/text.lzx
normal advanced
baseline 0.04 +/ 0.08 0.03 +/ 0
0.04 +/ 0.08 0.02 +/ 0.06
createElements 0.79 +/ 0.06 0.94 +/ 0.39
0.82 +/ 0.11 0.76 +/ 0.12
test/lfc/perf/textperformance.lzx
normal advanced
baseline 0.04 +/ 0.08 0 +/ 0 (that's weird)
changeText 4.51 +/ 0.45 4.52 +/ 0.28
bigText 2.87 +/ 0.16 3.11 +/ 0.38
wrapText 5.63 +/ 0.22 6.19 +/ 0.71
createElements 0.62 +/ 0.04 0.66 +/ 0.78
Is that worth it? The thing is, if we set it to "normal" by default,
then it won't be sweet unless people know to use the turn-on-
sweetness api, and they'd have to use it for every text object. Hmm,
I could we make a single runtime call that changes the default value
for all text objects, or add a compiler switch...
On Jun 26, 2007, at 11:07 PM, Max Carlson wrote:
It looks much better! Since the font capabilities all come in one
batch (flash or no) can you change LzSprite.js/as capabilities to
use a single entry, like 'advancedfonts'? Also, what are the
performance implications of leaving it on by default?
Other than that, approved!
Benjamin Shine wrote:
Change 20070626-ben-3 by [EMAIL PROTECTED] on 2007-06-26 19:56:43 PDT
in /Users/ben/src/svn/openlaszlo/branches/legals
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Improve default text rendering in swf8, add api for text
rendering hints
New Features: new api on LzText to control swf8 rendering parameters
Bugs Fixed:
Technical Reviewer: max (pending)
QA Reviewer: frisco (pending)
Doc Reviewer: (pending)
Documentation:
Added four new virtual attributes to LzText, each of which control
an aspect
of advanced text rendering in swf8: sharpness, thickness,
antiAliasType,
and gridFit. These attributes only have an effect in swf8; in
other runtimes,
they will quietly be no-ops. We provide set/get for each of these
new virtual
attributes, and give them good initial and default values.
Note that the default values are set such that <text>boring</text>
will
use advanced rendering and subpixel gridfitting by default, with
sharpness=0
and thickness=0.
Added capabilities for each of these text rendering attributes;
made these
capabilities true for swf, false for dhtml.
Release Notes:
Details:
Tests:
http://localhost:8080/legals/test/lztest/lztest-textstyle.lzx?
lzr=swf8&debug=true sussurate should look good but blurry. mimsy
borogroves should look not great.
"i should look bad" and "pixel gridfit" should have weird color
bands around the text
http://localhost:8080/legals/test/lztest/lztest-textstyle.lzx?
lzr=swf8&debug=true all the text should look the same
"ant doc" still works
Files:
M test/lztest/lztest-textstyle.lzx
M test/text/fonts.lzx
M WEB-INF/lps/schema/lzx.rnc
M WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/views/LzText.lzs
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070626-
ben-3.tar
Benjamin Shine
Software Engineer, Open Laszlo / Laszlo Systems
[EMAIL PROTECTED]
--
Regards,
Max Carlson
OpenLaszlo.org