Closed Bug 158894 Opened 22 years ago Closed 6 months ago

RFE: Document how to treat TrueType fonts as iso10646-1 with Solaris/Xsun

Categories

(Core :: Graphics: Text, defect)

Sun
Solaris
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: roland.mainz, Unassigned)

References

Details

I did not found any way yet to get my Solaris 2.7 box to recognise TrueType
fonts Unicode X fonts (e.g. that "xlsfonts" lists them as "*-iso10646-1", too).
Xsun just complaints that there is no encoding file for the "iso10646-1"
encoding... ;-(

katakai:
- Is there any way that Xsun supports iso10646-1 for TrueType fonts ?
- Should we put this info into the release notes ?
It is possible to add such new font encoding into Solaris,
but I understand such addition by user side is not officially supported.
Also I understand there is no plan to ship such files for
iso10646 support because Solaris is providing good enough
fonts for X applicationi support.

Roland, what's your exact problem about missing iso10646 fonts
for Mozilla?

How to support iso10646 fonts on Solaris is,

1. put iso10646 ttmap into /usr/openwin/lib/X11/fonts/TrueType/ttmap
2. put enc file into /usr/openwin/lib/X11/fonts/encodings/
3. define iso10646 XLFD in fonts.dir
4. Restart X server

Masaki Katakai wrote:
> Roland, what's your exact problem about missing iso10646 fonts
> for Mozilla?

One of my problems is that our arabic support does not work with the Solaris
fonts in /usr/openwin/lib/locale/ar/X11/fonts/TrueType and I am looking for a
workaround for that issue.
AFAIK Solaris could support them if we would treat the fonts as iso10646-1 (for
now until we have a better solution).

I know that *-iso10646-1 are evil, but sometimes they are usefull - like in the
case above... =:-)

> How to support iso10646 fonts on Solaris is,
>
> 1. put iso10646 ttmap into /usr/openwin/lib/X11/fonts/TrueType/ttmap
> 2. put enc file into /usr/openwin/lib/X11/fonts/encodings/

a) Where can I get these two files from (I'd like to make a Solaris package
(e.g. something to 'pkgadd') from that if possible) ?
b) Is there no need to update
/usr/openwin/lib/X11/fonts/TrueType/ttmap/ttmaps.dir and 
/usr/openwin/lib/X11/fonts/encodings/encodings.dir (is there a tool to do that
?) !?
I understand Prabhat will put patch for Solaris Arabic fonts.
We're planning to use iso-8859-8X to solve the problem.

> a) Where can I get these two files from (I'd like to make a Solaris package
> (e.g. something to 'pkgadd') from that if possible) ?

I don't think there is no package for this.

> b) Is there no need to update
> /usr/openwin/lib/X11/fonts/TrueType/ttmap/ttmaps.dir and 
> /usr/openwin/lib/X11/fonts/encodings/encodings.dir (is there a tool to do
that?) !?

Yes, you need to update the two files.

I have to say again those changes are not supported officially.
Masaki Katakai wrote:
> I understand Prabhat will put patch for Solaris Arabic fonts.
> We're planning to use iso-8859-8X to solve the problem.

s/iso-8859-8X/iso-8859-6X/, right ?

Do you want to support the Solaris Arabic PS Type 1 fonts, too ?
If I remember correctly smontagu said the fonts represent the unicode planes
used for arabic... is there a matching X11 encoding for that ?

> > a) Where can I get these two files from (I'd like to make a Solaris package
> > (e.g. something to 'pkgadd') from that if possible) ?
>
> I don't think there is no package for this.

Erm, no.
I mean I would like to create a package for that (e.g. which contains these
files and updates the *.dir files in the "postinstall" script (and in the
"postremove", too)).

> I have to say again those changes are not supported officially.

Agreed, but some developers would like to have such a toy... (that package would
be inofficial... :)
> s/iso-8859-8X/iso-8859-6X/, right ?

Sorry, you're correct.
 
> Do you want to support the Solaris Arabic PS Type 1 fonts, too ?
> If I remember correctly smontagu said the fonts represent the unicode planes
> used for arabic... is there a matching X11 encoding for that ?

Not sure... I don't know how to support add new encoding
for Type1 fonts.

> I mean I would like to create a package for that (e.g. which contains these
> files and updates the *.dir files in the "postinstall" script (and in the
> "postremove", too)).

It would be great.

> Agreed, but some developers would like to have such a toy... (that package would
> be inofficial... :)

I agreed.
Masaki Katakai wrote:
> > Do you want to support the Solaris Arabic PS Type 1 fonts, too ?
> > If I remember correctly smontagu said the fonts represent the unicode planes
> > used for arabic... is there a matching X11 encoding for that ?
>
> Not sure... I don't know how to support add new encoding
> for Type1 fonts.

There is no X11 encoding scheme to address single unicode planes, right ?

> > I mean I would like to create a package for that (e.g. which contains these
> > files and updates the *.dir files in the "postinstall" script (and in the
> > "postremove", too)).
>
> It would be great.

Yes, but I need the ttmap and encoding files for that...
iso10646.enc file can be dummy because this file is used to access F3 fonts.
But the file and entry in encodings.dir are needs. X server checks the
encoding and enables such encoding.

This should be like

STARTENCODING 2.0
# NAME PostScript -- None
NAME X11 iso10646-1
NAME Human "iso10646"
TRUETYPE <3,1> <3,2> <0,0>
CODELENGTH 2
# dummy because it's for F3
STARTCHARACTERS 1
0       0
ENDCHARACTERS
ENDENCODING

iso10646-1.ttmap file can be also created by hand.
this file defines mapping of native encoding -> UNICODE.
In this case, "native encoding" is UNICODE.

This should be like below. Left and right values should be
the same.

STARTTTMAP 1.0
FROM-ENCODING iso10646-1
TO-ENCODING  unicode
STARTCHARACTERS     34869
0x00    0x0000
0x01    0x0001
0x02    0x0002
0x03    0x0003
0x04    0x0004
0x05    0x0005
0x06    0x0006
0x07    0x0007
0x08    0x0008
0x09    0x0009
....
0xffee  0xffee
0xfffc  0xfffc
0xfffd  0xfffd
ENDCHARACTERS
ENDTTMAP
I tried the instructions with my Solaris 2.7 box - but for some reason I cannot
get it working ("patch" is available under
http://puck.informatik.med.uni-giessen.de/people/gisburn/work/mozilla/solaris_2_7_iso10646_support.txt
; [I can't attach it (even the compressed version) thanks to the new attachment
size restrictions... xx@@@!!!... ;-(] ).

/var/dt/Xerrors does not contain any error message. I only see the usual
connect/disconnect messages from audit level 4.

Any ideas ?
What's fonts.dir for you fonts?
Masaki Katakai wrote:
> What's fonts.dir for you fonts?

I copied the *.ttf fonts from /usr/openwin/lib/locale/ar/X11/fonts/TrueType/
into a new dir and created a fonts.scale with the following info:
-- snip --
11
NASK-MT.ttf -monotype-naskh-medium-r-normal--0-0-0-0-p-0-iso10646-1
NASK-MT.ttf -monotype-naskh-medium-i-normal--0-0-0-0-p-0-iso10646-1
NASK-MT.ttf -monotype-naskh-bold-r-normal--0-0-0-0-p-0-iso10646-1
NASK-MT.ttf -monotype-naskh-bold-i-normal--0-0-0-0-p-0-iso10646-1
AKHB-MT.ttf -monotype-akhbar-medium-r-normal--0-0-0-0-p-0-iso10646-1
SHAY-MT.ttf -monotype-shayyal-medium-r-normal--0-0-0-0-m-0-iso10646-1
AKHB-MT.ttf -monotype-akhbar-bold-r-normal--0-0-0-0-p-0-iso10646-1
AKHB-MT.ttf -monotype-akhbar-medium-i-normal--0-0-0-0-p-0-iso10646-1
SHAY-MT.ttf -monotype-shayyal-medium-i-normal--0-0-0-0-m-0-iso10646-1
AKHB-MT.ttf -monotype-akhbar-bold-i-normal--0-0-0-0-p-0-iso10646-1
SHAY-MT.ttf -monotype-shayyal-bold-i-normal--0-0-0-0-m-0-iso10646-1
-- snip --
... and then ran mkfontdir to create fonts.dir (which is a copy of fonts.scale
in this case).
Your instructions are correct.

Could you succeed to open the fonts by xfd?

Actually  I had tried such ar fonts as 10646 fonts in my environment
and it had worked. But arabic characters can not be displayed properly
on Mozilla. Not really sure why. (see my comments of #26 of bug 78201)
Masaki Katakai wrote:
> Your instructions are correct.
>
> Could you succeed to open the fonts by xfd?

Unfortunately no. And Xsun does not print _any_ error message... ;-(
I tested it on a Solaris 2.8 and another 2.7 machine without success... and I
have zero clues why it doesn't work... ;-(

> Actually  I had tried such ar fonts as 10646 fonts in my environment
> and it had worked. But arabic characters can not be displayed properly
> on Mozilla. Not really sure why. (see my comments of #26 of bug 78201)

Lets try to get the iso10646-1 stuff working first, then we can look why the
arabic glyphs are displayed wrong (I'll try to find other TrueType fonts with
arabic glyphs in the meantime) ...
What is 

+POSTSCRIPT ISO10646Encoding

?

Also how about 

+NAME Human "iso10646"

to

+NAME Human "iso10646-1"

?
Masaki Katakai wrote:
> What is 
>
> +POSTSCRIPT ISO10646Encoding
> ?

Something I thought it may be mandatory - but it isn't...
... removing that does not fix the problem... ;-(

> Also how about 
> +NAME Human "iso10646"
> to
> +NAME Human "iso10646-1"

Tested. No effect... ;-(
Assign to Roland.
Assignee: katakai → Roland.Mainz
OK, here comes the "joke of the day".
ISO10646-1 is working (I have a new patch, see
http://puck.informatik.med.uni-giessen.de/people/gisburn/work/mozilla/solaris_2_7_iso10646_1_support_patch_20020726.txt)
with any fonts except the arabic TrueType fonts in
/usr/openwin/lib/locale/ar/X11/fonts/TrueType/

Why ?
After tons of digging I found this:
-- snip --
% ls -l /usr/openwin/lib/locale/ar/X11/fonts/TrueType/
total 1590
-rw-rw-r--   1 root     bin       151036 Jul 31  1998 AKHBARBD.ttf
-rw-rw-r--   1 root     bin       140788 Jul 31  1998 AKHBARMT.ttf
-rw-rw-r--   1 root     bin          408 Aug 20  1998 fonts.dir
-rw-rw-r--   1 root     bin          740 Jun 25  1998 fonts.scale
-rw-rw-r--   1 root     bin       100124 Jul 31  1998 NASKHBD.ttf
-rw-rw-r--   1 root     bin       111252 Jul 31  1998 NASKHMT.ttf
-rw-rw-r--   1 root     bin          539 Jun 25  1998 PSres.upr
-rw-rw-r--   1 root     bin       122708 Jul 31  1998 SHAYBD.ttf
-rw-rw-r--   1 root     bin       110020 Aug 20  1998 SHAYMT4N.ttf
% cat /usr/openwin/lib/locale/ar/X11/fonts/TrueType/fonts.scale 
11
NASK-MT.ttf -monotype-naskh-medium-r-normal--0-0-0-0-p-0-iso8859-6
NASK-MT.ttf -monotype-naskh-medium-i-normal--0-0-0-0-p-0-iso8859-6
NASK-MT.ttf -monotype-naskh-bold-r-normal--0-0-0-0-p-0-iso8859-6
NASK-MT.ttf -monotype-naskh-bold-i-normal--0-0-0-0-p-0-iso8859-6
AKHB-MT.ttf -monotype-akhbar-medium-r-normal--0-0-0-0-p-0-iso8859-6
SHAY-MT.ttf -monotype-shayyal-medium-r-normal--0-0-0-0-m-0-iso8859-6
AKHB-MT.ttf -monotype-akhbar-bold-r-normal--0-0-0-0-p-0-iso8859-6
AKHB-MT.ttf -monotype-akhbar-medium-i-normal--0-0-0-0-p-0-iso8859-6
SHAY-MT.ttf -monotype-shayyal-medium-i-normal--0-0-0-0-m-0-iso8859-6
AKHB-MT.ttf -monotype-akhbar-bold-i-normal--0-0-0-0-p-0-iso8859-6
SHAY-MT.ttf -monotype-shayyal-bold-i-normal--0-0-0-0-m-0-iso8859-6
-- snip --
Or short: /usr/openwin/lib/locale/ar/X11/fonts/TrueType/fonts.scale on Solaris
2.7/2.8 lists font filenames which do not exist in that dir.
Since I copied the dir, modified fonts.scale to change s/iso8859-6/iso10646-1/
and run mkfontdir to rebuild fonts.dir the non-existing file names were stored
in fonts.dir ... no wonder that Xsun could not open them. xx@@@!!!

This ends in two bug reports for Solaris:
1. BUG: /usr/openwin/lib/locale/ar/X11/fonts/TrueType/fonts.scale contains
invalid font names (suggested fix: Copy fonts.dir over fonts.scale and be happy
:)
2. RFE: Xsun should print an error (incl. XLFD string, fonts.dir file name and
file name of font which wasn't found) to the log file when a font file cannot be
opened (it may be better to run |access()| for each entry in the fonts.dir while
the fonts.dir is being scanned and only put valid (e.g. existing fonts) into the
font index).
the files in the patch are not part of mozilla

If this is the needed action then it is not a mozilla problem and this bug
should be closed/invalid
Blocks: 207938

How should this be moved forward?

This is a search result for "Solaris TrueType" (11): https://support.oracle.com/knowledge/Sun%20Microsystems/2484210_1.html

The bug assignee didn't login in Bugzilla in the last 7 months.
:enndeakin, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: roland.mainz → nobody
Flags: needinfo?(enndeakin)
Component: XUL → Graphics: Text
Flags: needinfo?(enndeakin)
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.