Changeset 231


Ignore:
Timestamp:
Jan 9, 2011, 4:52:44 PM (15 years ago)
Author:
dmik
Message:

jdk: Added fontconfig for the Liberation font family and placed instructions how to activate it to README.OS2.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/README.OS2

    r230 r231  
    5252  of your CONFIG.SYS (and reboot) to make the given Java installation the
    5353  default one.
     54
     55  Please read the further sections (especially the "CURRENT LIMITATIONS" section
     56  below) to make sure that you are aware of possible problems you may run into
     57  while running Java applications using this product.
     58
     59
     60
     61FONT SELECTION
     62
     63  OpenJDK comes with no fonts and uses the system fonts by default. On OS/2,
     64  these fonts are Helvetica, Times New Roman and Courier -- they are are
     65  present in any version of OS/2. However, these are very old Type1 fonts with
     66  many glyphs having poor quality which can be seen even with font anti-aliasing
     67  turned on.
     68
     69  For this reason, OpenJDK for OS/2 provides an alternative font configuration
     70  that uses a freely available Liberation font family: Liberation Sans,
     71  Liberation Serif and Liberation Mono (with font metrics close to a widely
     72  used set of Monotype TTF fonts: Arial, Times New Roman and Courier New,
     73  respectively). In order to use the Liberation font family instead of the
     74  default Type1 fonts, do the following:
     75
     76  1. Download the latest binary (TTF) archive of Liberation fonts from:
     77
     78     https://fedorahosted.org/liberation-fonts/
     79
     80  2. Copy all *.TTF files from the archive to a directory and install them
     81     normally (for example, using the OS/2 Font Palette object).
     82
     83  3. Go to the directory "<OpenJDK>\bin\jre\lib" (where <OpenJDK> is where you
     84     installed the OpenJDK package) and copy the file
     85     "fontconfig.liberation.bfc" to "fontconfig.bfc". It is safe to overwrite
     86     the target file.
     87
     88  In order to return back to the default fonts, go to "<OpenJDK>\bin\jre\lib"
     89  again and copy the file "fontconfig.default.bfc" to "fontconfig.bfc".
     90
     91  Note that you need to restart all Java applications to let them pick up the
     92  new fonts.
     93
     94  Font Anti-Aliasing
     95
     96  In the current release, due to the low quality of the standard OS/2 Type1
     97  fonts, both AWT and Swing Java GUI toolkits use subpixel font anti-aliasing by
     98  default for all standard components.
     99
     100  If you want to change this behavior, you may use the following Java command
     101  line option:
     102
     103       -Dawt.useSystemAAFontSettings=<mode>
     104
     105  where <mode> is one of the following anti-aliasing modes:
     106
     107  off              Turns anti-aliasing off
     108  on               Turns on monochrome anti-aliasing
     109  lcd | lcd_hrgb * Turns on subpixel anti-aliasing optimized for HRGB LCD panels
     110  lcd_hbgr         Turns on subpixel anti-aliasing optimized for HBGR LCD panels
     111  lcd_vrgb         Turns on subpixel anti-aliasing optimized for VRGB LCD panels
     112  lcd_vbgr         Turns on subpixel anti-aliasing optimized for VBGR LCD panels
     113
     114  The setting marked with * is the default anti-aliasing value as it is suitable
     115  for the majority of the modern display hardware.
    54116
    55117
     
    73135  is known to be 512M. In later versions it is controlled by the
    74136  VIRTUALADDRESSLIMIT parameter in CONFIG.SYS (which is specified in megabytes
    75   and defaults to 1024M).
     137  and defaults to 1024).
    76138
    77139  Furthermore, not all memory within the virtual address limit is available to
     
    112174     arena.
    113175
    114   So, if your machine has, say, 2G of RAM and you attempt to start it in server
    115   mode (using the -server command line option), Java will want 512M (2G/4) plus
    116   additional 20-30%. This would obviously not fit into 432M of free private
    117   memory available for the process when VIRTUALADDRESSLIMIT is set to 1024 and
    118   it was the case with earlier releases of OpenJDK 6 for OS/2 as well as with
    119   the releases of InnoTek Java 1.4.x for OS/2.
     176  So, if your machine has, say, 2G of RAM and you attempt to start a Java
     177  application Java server mode (using the -server command line option), Java
     178  will want 512M (2G/4) plus additional 20-30%. This would obviously not fit
     179  into 432M of free private memory available for the process when
     180  VIRTUALADDRESSLIMIT is set to 1024 and this was the case with earlier releases
     181  of OpenJDK 6 for OS/2 as well as with the releases of InnoTek Java 1.4.x for
     182  OS/2.
    120183
    121184  Starting with version 6 Beta 2, OpenJDK for OS/2 solves this problem by
    122185  limiting the amount of memory Java wants for the heap to the actual size of
    123186  the available memory block in the private arena. So, in the above case Java
    124   would actually get about 310M in server mode (instead of performing a failed
     187  will actually get about 310M in server mode (instead of performing a failed
    125188  attempt to allocate 512M). You may change this limit by changing the
    126189  VIRTUALADDRESSLIMIT value in CONFIG.SYS (according to the table above), but
     
    133196  command line option if you are not satisfied with the default value for some
    134197  reason or if your applcation gives you the "Could not reserve enough space for
    135   object heap" message at startup. However, keep in mind that if you specify a
    136   -Xmx value which is, increased by 20-30% as described in step 3 above, bigger
    137   than the maximum free block in the private arena, you will get the same memory
    138   allocation error which indicates that you should use a smaller value.
     198  object heap" error message at startup. However, keep in mind that if you
     199  specify a -Xmx value which is, increased by 20-30% as described in step 3
     200  above, bigger than the maximum free block in the private arena, you will get
     201  the same memory allocation error which indicates that you should use a smaller
     202  value.
    139203
    140204
     
    151215     subdirectory of the SDK distribution archive).
    152216
    153   3. AWT and Swing always use font anti-aliasing for all standard components.
    154      If you want to disable anti-aliasing, you may use the following Java
    155      command line argument:
    156 
    157        -Dawt.useSystemAAFontSettings=off
    158 
    159      However, this is not recommended since Java uses standard OS/2 Type1
    160      fonts by default which look really ugly with anti-aliasing turned off.
    161 
    162217  3. Some rarely used Java system classes may be still missing in this release.
    163218
  • trunk/openjdk/jdk/make/sun/awt/Makefile

    r218 r231  
    447447FONTCONFIGS_SRC = $(PLATFORM_SRC_OS2)/classes/sun/awt/os2
    448448_FONTCONFIGS = \
    449         fontconfig.properties
     449        fontconfig.properties \
     450        fontconfig.liberation.properties
    450451
    451452FONTCONFIGS_SRC_PREFIX =
     
    499500FONTCONFIGS     = $(_FONTCONFIGS:%=$(LIBDIR)/%.src)
    500501BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc)
     502
     503ifeq ($(PLATFORM), os2)
     504# copy the default fontconfig file to fontconfig.default.* for convenience
     505FONTCONFIGS       += $(LIBDIR)/fontconfig.default.properties.src
     506BINARYFONTCONFIGS += $(LIBDIR)/fontconfig.default.bfc
     507$(LIBDIR)/fontconfig.default.properties.src: $(LIBDIR)/fontconfig.properties.src
     508        $(install-file)
     509$(LIBDIR)/fontconfig.default.bfc: $(LIBDIR)/fontconfig.bfc
     510        $(install-file)
     511endif
    501512
    502513fontconfigs: $(FONTCONFIGS) $(BINARYFONTCONFIGS)
Note: See TracChangeset for help on using the changeset viewer.