rui wrote:
> Hi,
>
> I am facing this problem with XSun on opensolaris where I am trying to load a
> XLFD font using XLoadQueryFont.
If it has Xsun, it cannot be OpenSolaris - OpenSolaris does not include Xsun,
only Xorg, as Xsun is neither open source nor freely redistributable due to
third-party closed source code in it.
> The font i am trying to load is -*-courier
> new-medium-r-*--13-91-*-*-*-*-iso10646-1 and the font which gets loaded is
> -Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1
>
> I also get this error on the output window
> "Cannot find encoding file for iso10646-1"
>
> However this error doesn't occur on the suse linux server.
>
> I have copied courier new fonts from windows and they are properly added to
> font path -- xlsfonts shows them as loaded:
> /usr/openwin/bin/xlsfonts -display :0 | grep iso10646
> -monotype-courier new-bold-i-normal--0-0-0-0-m-0-iso10646-1
> -monotype-courier new-bold-r-normal--0-0-0-0-m-0-iso10646-1
> -monotype-courier new-medium-i-normal--0-0-0-0-m-0-iso10646-1
> -monotype-courier new-medium-r-normal--0-0-0-0-m-0-iso10646-1
>
> How can i load the encoding file for iso10646, i had a look on suse linux as
> well as solaris, there are files present in /usr/X11/lib/X11/fonts/ and
> /usr/openwin/lib/X11/fonts with the name of encodings.dir pointing to *.enc
> files and also on solaris in truetype directory there is a folder called
> ttmap with files of *.ttmap extension.
> I have also made sure that there is no file by the name and content of
> iso10646 on both systems but why doesn't suse linux doesn't complain?
The ttmaps files are used by Xsun, the encodings files by Xorg. From a quick
peek in the libfontenc source used by Xorg to read those encodings files, it
seems that it handles "iso10646-1" internally, since the encoding files map
other character set encodings to unicode, and there is no mapping table needed
to map unicode to itself.
> The main directories are all added to the fontpath of xserver.
>
> What can be the problem with not finding encoding file for iso10646?
> Is there a way through xlib api or anyway that I can find the encoding file
> being used by a font, so that I can provide the same file as on suse to sun
> solaris?
I don't think the Xsun server supports the 10646-1 encoding - I don't remember
what it used for the Unicode encoding name, so I've cc'ed i18n-discuss where
the internationalization experts may know. (I do see some fonts listing an
'-unicode-fontspecific' encoding in old Xsun fonts.dir files, but am not sure
if that's correct or not.)
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering