|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: notes.src,v 2.1 1998-02-19 01:06:11 ijacobs Exp $ --> |
| 3 | +<!-- $Id: notes.src,v 2.2 1998-02-21 00:14:58 ijacobs Exp $ --> |
4 | 4 | <HEAD> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | 6 | <TITLE>Appendix C: Implementation and performance notes</TITLE> |
7 | 7 | </HEAD> |
8 | 8 | <BODY> |
9 | 9 | <H1 align="center">Implementation and performance |
10 | 10 | notes</H1> |
11 | | - |
12 | | -<h2>Order of property value calculation</h2> |
13 | | -<P><em>This section is under construction</em> |
14 | | - |
15 | | -<P>Due to dependencies among properties, user agents must |
16 | | -<a href="cascade.html#computed-value">compute</a> some property |
17 | | -values in a specific order.</P> |
18 | | - |
19 | | -<ul> |
20 | | -<li><span class="propinst-font-size">'font-size'</span> must be |
21 | | -computed before any property that may take a <a |
22 | | -href="syndata.html#absrel-units">relative length</a> units. |
23 | | - |
24 | | -<li><span class="propinst-display">'display'</span>, <span |
25 | | -class="propinst-position">'position'</span>, and <span |
26 | | -class="propinst-float">'float'</span> must be computed before other |
27 | | -<a href="visuren.html">visual flow</a> properties. |
28 | | - |
29 | | -<li><span class="propinst-line-height">'line-height'</span> must be |
30 | | -computed before <span |
31 | | -class="propinst-vertical-align">'vertical-align'</span>. |
32 | | - |
33 | | -<li>An element's width and height must be computed before |
34 | | -<span class="propinst-background-position">'background-position'</span>. |
35 | | -</ul> |
36 | | - |
37 | | - |
38 | | -<H2>Colors</H2> |
39 | | -<H3><a name="gamma-correction">Gamma Correction</a></H3> |
40 | | - |
41 | | -<P><em>The following information is informative, not normative. |
42 | | -See the Gamma Tutorial in the PNG specification ([[PNG10]]) |
43 | | -if you aren't familiar with gamma issues.</em> |
44 | | - |
45 | | -<P> In the computation, UAs displaying on a CRT may assume an ideal |
46 | | -CRT and ignore any effects on apparent gamma caused by dithering. That |
47 | | -means the minimal handling they need to do on current platforms is: |
48 | | - <DL> |
49 | | - <DT> |
50 | | - PC using MS-Windows |
51 | | - <DD> |
52 | | - none |
53 | | - <DT> |
54 | | - Unix using X11 |
55 | | - <DD> |
56 | | - none |
57 | | - <DT> |
58 | | - Mac using QuickDraw |
59 | | - <DD> |
60 | | - apply gamma 1.39 [[ICC32]] (ColorSync-savvy applications |
61 | | - may simply pass the sRGB ICC profile to ColorSync |
62 | | - to perform correct color correction) |
63 | | -<!-- ref14 doesn't exist --> |
64 | | - <DT> |
65 | | - SGI using X |
66 | | - <DD> |
67 | | - apply the gamma value from <TT>/etc/config/system.glGammaVal</TT> (the default |
68 | | - value being 1.70; applications running on Irix 6.2 or above may simply pass |
69 | | - the sRGB ICC profile to the color management system) |
70 | | - <DT> |
71 | | - NeXT using NeXTStep |
72 | | - <DD> |
73 | | - apply gamma 2.22 |
74 | | - </DL> |
75 | | -<P> "Applying gamma" means that each of the three R, G and B must be |
76 | | -converted to R'=R<SUP>gamma</SUP>, G'=G<SUP>gamma</SUP>, |
77 | | -B'=B<SUP>gamma</SUP>, before handing to the OS. |
78 | | - |
79 | | -<P> This may rapidly be done by building a 256-element lookup table |
80 | | -once per browser invocation thus: |
81 | | - |
82 | | -<PRE> |
83 | | - for i := 0 to 255 do |
84 | | - raw := i / 255; |
85 | | - corr := pow (raw, gamma); |
86 | | - table[i] := trunc (0.5 + corr * 255.0) |
87 | | - end |
88 | | -</PRE> |
89 | | - |
90 | | -<P> which then avoids any need to do transcendental math per color |
91 | | -attribute, far less per pixel. |
| 11 | +<P><em>This appendix is informative, not normative.</em></P> |
92 | 12 |
|
93 | 13 | <H2>Fonts</H2> |
94 | 14 |
|
|
0 commit comments