jdk/make/tools/src/build/tools/fontchecker/README.txt
changeset 4135 08d5964ec7d4
parent 4134 430015834eb3
parent 4129 658d1b92c389
child 4140 9c3e48ab69a6
equal deleted inserted replaced
4134:430015834eb3 4135:08d5964ec7d4
     1 /*
       
     2  * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Sun designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Sun in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    22  * CA 95054 USA or visit www.sun.com if you need additional information or
       
    23  * have any questions.
       
    24  */
       
    25 Instructions for running FontChecker 
       
    26 ------------------------------------
       
    27 
       
    28 FontChecker is a program designed to identify fonts that may cause JRE
       
    29 crashes. Such fonts may be corrupted files, or badly constructed fonts.
       
    30 Some crashes may also be due to bugs in the JRE's font code.
       
    31 This test is designed to run quickly and silently as part of the JRE
       
    32 installation process. It will only benefit users who install the JRE
       
    33 via that mechanism. It cannot guarantee to identify all "bad fonts" because
       
    34 the tests are minimal. Nor can it prevent problems due to fonts installed
       
    35 subsequently to the JRE's installation. However it does ensure that the
       
    36 vast majority of problem fonts are identified. This is important
       
    37 "RAS" functionality. It is targeted at the consumer/plugin market where
       
    38 there is substantial likelihood of end-users having installed software
       
    39 packages which may be delivered with fonts that are not up to commercial
       
    40 standards.
       
    41 
       
    42 The test is designed to be "fail safe". If the program fails to run
       
    43 properly it has no impact on the installer or on JRE execution.
       
    44 Thus there is no need to monitor successful execution of the test.
       
    45 
       
    46 The test is not a new "tool" in the sense of "javah" etc.
       
    47 The test is not designed to be user executable or visible, and should
       
    48 be unpacked by the installer into a temporary location, and executed
       
    49 once the rest of the JRE is installed (ie as a postinstall step), and
       
    50 can then be deleted from the temporary location once installation is
       
    51 complete. Not deleting the jar file before execution is complete is
       
    52 probably the sole reason that the installer may want to wait for
       
    53 the program to complete.
       
    54 
       
    55 The FontChecker application can be run directly from the jar 
       
    56 file with this command: 
       
    57 	%java -jar fontchecker.jar -o <file>
       
    58 
       
    59 The output file is a required parameter in this version of the application.
       
    60 The JRE installer should use the above form, and use it to create an
       
    61 output file which must be named "badfonts.txt" and be placed into
       
    62 the JRE's lib\fonts directory eg:-
       
    63 
       
    64         java -jar fontchecker.jar -o "C:\Program Files\jre\lib\fonts\badfonts.txt"
       
    65 
       
    66 Note the lower case "badfonts.txt", and the string quotes because of the spaces
       
    67 in the path name.
       
    68 The location given here is an example and needs to be calculated at install
       
    69 time as $JREHOME\lib\fonts\badfonts.txt
       
    70 The location and name are important, because the JRE at runtime will
       
    71 look for this exactly located name and file.
       
    72 This location is private to that JRE instance. It will not affect
       
    73 any other JRE installed on the system.
       
    74 
       
    75 If running from a different directory than that containing the jar file,
       
    76 use the form containing the full path to the jar file, eg :
       
    77 
       
    78 	java -jar C:\fc\fontchecker.jar -o "C:\Program Files\jre\lib\fonts\badfonts.txt"
       
    79 
       
    80 FontChecker application accepts following command line flags. 
       
    81 usage: java -jar fontchecker.jar -o outputfile
       
    82 	                -v 
       
    83 
       
    84        -o is the name of the file to contains canonical path names of
       
    85           bad fonts that are identified. This file is not created if
       
    86           no bad fonts are found.
       
    87 
       
    88        -v verbose mode: print progress/warning messages. Not recommended
       
    89          for installer use.
       
    90 
       
    91        -w if running on Windows, use "javaw" to exec the sub-process.