Previous Next


                                             684
CHAPTER 8                                                                 Interactive Features



2. If either of the values uses UTF-16 encoding, promote the other value to UTF-
   16 if necessary.
3. Compare the resulting strings.

If the strings are unequal, it is assumed the field has been modified by an older
viewer, and a new rich text string should be created from the flat text.

When a rich text string specifies font attributes, the viewer application should use
font name selection as described in section 15.3 of the CSS2 specification (see the
Bibliography). It is strongly recommended that precedence be given to the fonts
in the default resources dictionary, as specified by the DR entry in Table 8.67; see
Implementation note 120 in Appendix H.

The following example illustrates the entries in a widget annotation dictionary
for rich text. The DS entry specifies the default font. The RV entry contains two
paragraphs of rich text: the first paragraph specifies bold and italic text in the de-
fault font; the second paragraph changes the font size.

Example 8.15

   /DS (font: 18pt Arial)               % Default style string using an abbreviated font
                                        % descriptor to specify 18pt text using an Arial font

   /RV (<?xml version="1.0"?><body xmlns="http://www.w3.org/1999/xtml"
         xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
         xfa:contentType="text/html" xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.4">
         <p style="text-align:left">
             <b>
                <i>
                    Here is some bold italic text
                </i>
             </b>
         </p>
         <p style= "font-size:16pt">
             This text uses default text state parameters but changes the font size to 16.
         </p>
      </body> )

Previous Next