|
Enabling Symbol Fonts in Netscape under X
by Ian Hutchinson
Quick fix with inferior visual quality
-
Add the following line to your .Xdefaults (or .Xresources):
Netscape*documentFonts.charset*adobe-fontspecific: iso-8859-1
-
$ xrdb .Xdefaults
or else restart the X server.
-
Restart Netscape.
Detailed discussion and how to implement a visually superior solution
Netscape (3+) organizes its fonts by Options/Document-Encoding, which
controls the document overall and then, within that encoding, by a set
of names available via HTML tags
<font face="name">.
Obviously, accessing symbols in a regular document by changing the overall
encoding is not what one wants.
The relevant default encoding is generally Western (iso-8859-1).
With fonts set up in the normal way, one cannot access the symbol face
from the default (Western) encoding, because it is not one of the
available fonts. In the font-choosing section of Netscape, anything
that Netscape can't identify (such as the fontspecific fonts, of which
the symbol set is one) is put into an encoding set ``User-Defined'',
which one can't make the default because it does not have the standard
fonts. The iso-8859-1 encoding font group appears to consist of all
the fonts in the X-server that end in iso8859-1.
One way to fool netscape is to alias fonts that are symbol to have a
bogus name ending iso8859-1. That causes Netscape to include them in
the standard encoding set, so they are routinely available to any
document with the default encoding, for example by
<font face="symbol">w</font> (which gives an omega).
In a typical X setup, all this requires is that the following lines be
added to a fonts.alias file in the standard font path(s) for the
server, and then the server should be restarted (or xset fp rehash).
!___________________________Cut here__________________________________________
! 100dpi aliases to fool Netscape into symbol support in iso8859 encoding.
-adobe-symbol-medium-r-normal--11-80-100-100-p-61-iso8859-1 -adobe-symbol-medium-r-normal--11-80-100-100-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-100-100-100-p-85-iso8859-1 -adobe-symbol-medium-r-normal--14-100-100-100-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--17-120-100-100-p-95-iso8859-1 -adobe-symbol-medium-r-normal--17-120-100-100-p-95-adobe-fontspecific
-adobe-symbol-medium-r-normal--20-140-100-100-p-107-iso8859-1 -adobe-symbol-medium-r-normal--20-140-100-100-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--25-180-100-100-p-142-iso8859-1 -adobe-symbol-medium-r-normal--25-180-100-100-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--34-240-100-100-p-191-iso8859-1 -adobe-symbol-medium-r-normal--34-240-100-100-p-191-adobe-fontspecific
!__________________________Cut here optionally_________________________________
! 75dpi Netscape symbol aliases.
-adobe-symbol-medium-r-normal--10-100-75-75-p-61-iso8859-1 -adobe-symbol-medium-r-normal--10-100-75-75-p-61-adobe-fontspecific
-adobe-symbol-medium-r-normal--12-120-75-75-p-74-iso8859-1 -adobe-symbol-medium-r-normal--12-120-75-75-p-74-adobe-fontspecific
-adobe-symbol-medium-r-normal--14-140-75-75-p-85-iso8859-1 -adobe-symbol-medium-r-normal--14-140-75-75-p-85-adobe-fontspecific
-adobe-symbol-medium-r-normal--18-180-75-75-p-107-iso8859-1 -adobe-symbol-medium-r-normal--18-180-75-75-p-107-adobe-fontspecific
-adobe-symbol-medium-r-normal--24-240-75-75-p-142-iso8859-1 -adobe-symbol-medium-r-normal--24-240-75-75-p-142-adobe-fontspecific
-adobe-symbol-medium-r-normal--8-80-75-75-p-51-iso8859-1 -adobe-symbol-medium-r-normal--8-80-75-75-p-51-adobe-fontspecific
!___________________________Cut here___________________________________________
There may be undesirable consequences from this bogus alias for other
X programs. Not giving a scalable font alias minimizes this but it
means the symbol font can't be scaled arbitrarily.
In the .netscape preferences file there is a list of full (X) font names.
like this:
DOC_CSID: 2
FONT_CHARSET: iso-8859-1
FONT_SPEC: schumacher-clean-120-noscale-fixed-x-user-defined
FONT_SPEC: schumacher-clean-120-noscale-prop-x-user-defined
FONT_SPEC: isas-fangsong ti-0-noscale-fixed-gb_2312-80
FONT_SPEC: isas-fangsong ti-0-noscale-prop-gb_2312-80
FONT_SPEC: daewoo-gothic-0-noscale-fixed-ks_c_5601-1987
FONT_SPEC: daewoo-gothic-0-noscale-prop-ks_c_5601-1987
FONT_SPEC: misc-fixed-0-noscale-fixed-jis_x0201
FONT_SPEC: misc-fixed-0-noscale-prop-jis_x0201
FONT_SPEC: jis-fixed-150-noscale-fixed-jis_x0208-1983
FONT_SPEC: jis-fixed-150-noscale-prop-jis_x0208-1983
FONT_SPEC: etl-fixed-0-noscale-fixed-iso-8859-7
FONT_SPEC: etl-fixed-0-noscale-prop-iso-8859-7
FONT_SPEC: adobe-courier-180-scale-fixed-iso-8859-1
FONT_SPEC: adobe-times-180-scale-prop-iso-8859-1
These appear to be the defaults that are used in each of the encoding cases
for proportional and fixed fonts.
Unfortunately, if you have set up the default size of the default font
to be anything other than 12.0, as is the case in the above list, this
fact is remembered only for the default fonts, not for the symbols (or
any other face one might switch to). You have two options:
-
Use 100dpi fonts (to make them display larger) and size 14.0 as
your default. Assuming that both 75 and 100dpi fonts are in your font
path, this is done by including the following lines in your .Xdefaults
file.
Netscape*documentFonts.xResolution*iso-8859-1: 100
Netscape*documentFonts.yResolution*iso-8859-1: 100
Then reset Options/General-Preferences/Fonts/Proportional times font
size to 14. This will give a screen size virtually the same as 18.0
at 75dpi, which is comfortable on my 15 inch monitor. For some reason,
the symbol fonts come out a fair matching size, even though Netscape
chooses nominally 12.0, (not 14.0 like the times).
-
Fix the symbol size every time you restart Netscape
In Netscape use Options/General-Preferences/Fonts/Proportional,
choosing symbol specifically, and setting its size, then setting the
default back to e.g. times. That will fix it till the next time
Netscape is restarted. There ought to be a better way. If you find
one, let me know. [hutch@psfc.mit.edu]
Summary
-
Cut out the above section(s) to file(s) 100dpi.alias, 75dpi.alias or
construct your own aliases based on $ xlsfonts | fgrep symbol
aliasing the terminating -*-fontspecific to -iso8859-1.
-
Become the superuser.
Determine the correct directory on the standard font path, e.g.
/usr/X11R6/lib/X11/fonts/100dpi
-
Append the file(s) to the fonts.alias there:
# cat 100dpi.alias >> /usr/X11R6/lib/X11/fonts/100dpi/fonts.alias
# cat 75dpi.alias >> /usr/X11R6/lib/X11/fonts/75dpi/fonts.alias
[Actually one can just append the whole lot to either alias file.]
-
xset fp rehash or restart the Xserver.
-
Restart Netscape.
Problem with the Quick Fix
The quick fix mentioned at the beginning of this document tells
Netscape to include any font ending adobe-fontspecific in its western
(8859-1) list. Then the above aliases are not needed.
For reasons that escape me, however, when this alternative is used,
the font sizes are rendered incorrectly, and small gaps appear
between parts of large symbols that are built on top of one-another (a
problem that also occurs in MS Windows).
The alternative is therefore somewhat less satisfactory from the
viewpoint of aesthetics. It does have the advantage that you can
make the changes without becoming the superuser.
|