Hi Alan,

At first, I'm sorry for missing your discuss about X11 fonts repackage, 
hope my comments
is not too late for you..

Same with you, during migration/repackage fonts package to IPS package 
system, we also encounter
the issue that fonts.dir/fonts.alias can not be created by running 
postscript. So, I agree your proposal
C to include pre-made fonts.dir.

However I have some detail questions about solution C:

1> I noticed in snv_103, there are several sylinks in /etc/X11/fontpath.d
the name like 100dpi:pri=90 ,100dpi:unscaled:pri=20, TrueType:pri=41...
Are there any rules for name the sylinks name?

2>This solution seems only handle the fonts form package FSWxorg-fonts, 
from my point of view,
if OWfontpath file has been removed, the Chinese fonts would not 
available for X11 at least.

3> As you know, besides xorg-fonts, we also have many additional fonts 
which are place in
/usr/openwin/lib/locale/XXX/X11/fonts, and they are declared in 
/usr/openwin/lib/locale/XXX/OWfontpath,
if replace OWfontpath by fontpath.d, how can X11 use these additional fonts?

4> Recently we also integrated many open Truetype fonts, we put them to 
/usr/X11/lib/X11/fonts/TrueType
by font name category sub-directory. You may see them in 
/usr/X11/lib/X11/fonts/TrueType, such like,
arphic, arabeyes, ipafont, thai-scalable, hangyang... and so on. If X11 
want to use some of these fonts,
How to make them visible by X11 by fontpath.d method?

2>, 3>,4> are questions we need to resolve by fontpath.d method. So far, 
I have some suggestion about it:
option A:
Add more sylinks in /etc/X11/fontpath.d to link the additional fonts, 
such like:
../../../usr/X11/lib/X11/fonts/TrueType/arphic,
../../../usr/X11/lib/X11/fonts/TrueType/hangyang,
anyway, how to name the sylink name, need a rule. that is question 1.

This way will cause the number of sylink in fontpath.d increase.

option B:
Create sub-directory in fontpath.d. The sub-directorys are locale 
category, it maybe look like: ko_KR.UTF-8, zh_CN.UTF-8,
en_US.UTF-8. In these locale-sub-directory create sylike to link the 
really fonts path. Current contents in fontpath.d could be
put into default or C(locale) sub-directory which include default X11 
xorg fonts.

(This solution seems like replace OWfontpath with create sylink by the 
content OWfontpath.)

Looking forward your any comments and feedback.

Thanks!

Regards,
William


Alan Coopersmith ??:
> One of the problems I've been needing to solve is how to deal with
> multiple IPS packages installing fonts, given the X server requirement
> to have mkfontdir create a fonts.dir file listing all font files in
> a given directory.
>
> In Solaris SVR4 packages, we deal with this by using class action
> scripts & postinstall/remove scripts to run mkfontdir in each
> directory that the package installs fonts in - this allows splitting
> each font directory across multiple packages.
>
> For 2008.05, we dealt with this by not splitting fonts across packages,
> delivering one gigantic FSWxorg-fonts package that contained 45mb of
> fonts.   This is too much for the LiveCD, so we have to split it up.
>
> Without scripting in IPS, the options seem to be:
>  a) define a font action in IPS
>  b) create a SMF service that somehow knows where the font dirs are
>     and runs mkfontdir in them
>  c) create new subdirectories with fonts in that we can ship the
>     entire subdir in one package, with a pre-made fonts.dir included
>
> C is the simplest and cleanest option, but introduces a new wrinkle -
> how do these font directories get into the X server's font path so the
> fonts are used?    The solution comes from Fedora, who faced similar
> issues and contributed their solution upstream.   The libXfont we now
> ship has support for "catalogue" directories - directories which have
> just symlinks to the actual font directories, so that when you add a
> font package, it installs its fonts in a new directory, and adds a
> symlink to the catalogue directory.
>
> This is my proposed plan, which I'm working on implementing soon unless
> someone has a better suggestion.
>
> - Create /etc/X11/fontpath.d and add 'catalogue:/etc/X11/fontpath.d'
>   to the default Xorg font path in nv_101.
>
> - Split FSWxorg-fonts into several smaller packages.   Each of
>   these packages will own one or more subdirectories of
>   /usr/X11/lib/X11/fonts and ship with a prebuilt fonts.dir for
>   each subdirectory, and add appropriate links to /etc/X11/fontpath.d.
>
> - For nv_101, the core font directories will remain in the default Xorg
>   font path, but as part of the Xorg 1.5.1 integration (currently planned
>   for sometime around nv_104-106, once 2008.11 is out the door), we'll
>   drop them and just have catalogue:/etc/X11/fontpath.d as the default
>   Xorg font path.
>
> I'll be doing this work for the fonts shipped from the X11 consolidation.
> The G11n teams will have to figure out if they want to use this method to
> replace OWfontpath and other methods of adding the per-locale font
> directories to the X server font path.
>
> The package split I'm currently looking at to replace FSWxorg-fonts is:
>
> [For those who don't have all the ISO 8859-* variants memorized, see:
>  http://en.wikipedia.org/wiki/ISO_8859#The_Parts_of_ISO.2FIEC_8859 ]
>
> FSWxorg-fonts-core:   the core set of fonts, including Deja Vu, Liberation,
>  and the default X bitmap fonts in ISO 8859-1,2,15,16.
>  /usr/X11/lib/X11/fonts/75dpi,  6.1M
>  /usr/X11/lib/X11/fonts/100dpi, 6.8M
>  /usr/X11/lib/X11/fonts/TTF,   10.2M
>  /usr/X11/lib/X11/fonts/Type1,  2.8M
>  /usr/X11/lib/X11/fonts/misc,   4.6M
>                               Total: 30.5M
>
> FSWxorg-fonts-cyrillic: Cyrillic
>  /usr/X11/lib/X11/fonts/cyrillic, 427k
>
> FSWxorg-fonts-daewoo: Daewoo's Korean/Hangul fonts
>  /usr/X11/lib/X11/fonts/daewoo, 848k
>
> FSWxorg-fonts-jiskan: "jiskan" Japanese/Kanji fonts
>  /usr/X11/lib/X11/fonts/jiskan, 624k
>
> FSWxorg-fonts-syriac: Syriac
>  /usr/X11/lib/X11/fonts/syriac, 6M
>
> FSWxorg-fonts-vera: Bitstream Vera
>  /usr/X11/lib/X11/fonts/vera, 570k
>
> FSWxorg-fonts-iso8859-3: South European: Turkish, Maltese, and Esperanto
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-3, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-3, 210k
>
> FSWxorg-fonts-iso8859-4: North European: Baltics, Greenlandic, and Sami
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-4, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-4, 210k
>
> FSWxorg-fonts-iso8859-9: Turkish
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-9, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-9, 210k
>
> FSWxorg-fonts-iso8859-10: Nordic
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-10, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-10, 210k
>
> FSWxorg-fonts-iso8859-13: Baltic Rim
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-13, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-13, 210k
>
> FSWxorg-fonts-iso8859-14: Celtic
>  /usr/X11/lib/X11/fonts/75dpi-ISO8859-14, 210k
>  /usr/X11/lib/X11/fonts/100dpi-ISO8859-14, 210k
>
>   


-- 
==============================================================
William Xue
Asian Globalization Center
Sun Microsystems China Engineering & Research Institute

(Office Phone): (86)10-8261-8200 ext. 83958
(Direct Line) : (86)10-6267-7958
(Email)       : Wei.Xue at Sun.com
(My Blog)     : http://blogs.sun.com/weixue
============================================================== 


Reply via email to