Re: new font support (was: fonts and symbolic links)

2004-08-26 Thread Igor Pechtchanski
On Thu, 26 Aug 2004, Jack Tanner wrote:

> Ago and Igor,
>
> If I understand your recent work correctly, Cygwin/X will (as of the next
> release) support using TTF fonts and will automatically have access to the
> fonts installed under Windows. This is exciting... I think. But can you
> explain the actual impact of this?

AFAIU, you will be able to use TTF fonts in your X applications.

> (What applications would be able to use this,

All of them.

> under what circumstances, where could they be running, and how could a
> user make this happen?)

They could be running anywhere, as long as you specify the right font name
to the application.  In other words, you'd be able to open an xterm off
your Linux machine with the font name of a Windows TTF font, and it should
work as long as the X server understands the font name and can render it.

The easiest way to test it would be to open a remote xterm, run xfontsel
(or xlsfonts) locally, copy the font name, then use the font menu of the
xterm (Ctrl-right-click), and choose "Selection".

> Thanks for all your hard work.
>
> P.S. Does anybody know if you can post to the mailing list via
> gmane.org's web interface?

According to the GMane posting page (), "To
post to a list, you can use the news interface or the web interface."
Haven't done it myself, though.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


new font support (was: fonts and symbolic links)

2004-08-26 Thread Jack Tanner
Ago and Igor,
If I understand your recent work correctly, Cygwin/X will (as of the next 
release) support using TTF fonts and will automatically have access to the 
fonts installed under Windows. This is exciting... I think. But can you 
explain the actual impact of this? (What applications would be able to use 
this, under what circumstances, where could they be running, and how could a 
user make this happen?)

Thanks for all your hard work.
P.S. Does anybody know if you can post to the mailing list via gmane.org's 
web interface?

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



Re: fonts and symbolic links

2004-08-26 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Igor Pechtchanski wrote:

> How about
> 
> ENCODINGS=`(
> cd /usr/X11R6/lib/X11/fonts/encodings && ls microsoft-cp* | sed -e 's/.enc$//'
> test -r "$ENC_FILE" && sed -e 's/#.*$//' -e '/^ *$/d' "$ENC_FILE"
> ) | sed -e 's/^/-a /'`

seams reasonable. 

> Again, what about something like
> 
> (
> ls -d /usr/X11R6/lib/X11/fonts/*
> test -r "$DIR_FILE" && sed -e 's/#.*$//' -e '/^ *$/d' "$DIR_FILE"
> ) | while read fontdir; do

this too.

> I'm sure there's a way to make the above shorter, but if it works, why 
> bother?  Looks reasonable.

I'll think I'll add this to xorg-x11-bin in the next release and adjust the 
post-install scripts for the font packages

bye
ago 
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: fonts and symbolic links

2004-08-25 Thread Igor Pechtchanski
On Wed, 25 Aug 2004, Alexander Gottwald wrote:

> On Wed, 25 Aug 2004, Igor Pechtchanski wrote:
> 
> > > I think of adding a wrapper which reads directories and encodings from
> > > configfiles (+some builtins) and does the fontdir update for us.
> > 
> > Yep, that'd be great.  Thanks.
> 
> check the attached script.
> [script inlined below]
> 
> #!/bin/sh
> #
> # Update font information for X11
> #
> # Creates fonts.scale, fonts.dir and fonts.cache-1
> #
> PATH="$PATH:/usr/X11R6/bin"
> #
> # /etc/X11/font-encodings contains one encoding per line
> # /etc/X11/font-dirs contains one fontdir per line
> ENC_FILE=/etc/X11/font-encodings
> DIR_FILE=/etc/X11/font-dirs
> 
> #
> # Build ENCODINGS parameter. This is ugly. Who can do it better?
> #
> ENCODINGS=`
> (
> cat << EOF
> microsoft-cp1250
> microsoft-cp1251
> microsoft-cp1252
> microsoft-cp1253
> microsoft-cp1254
> microsoft-cp1255
> microsoft-cp1256
> microsoft-cp1257
> microsoft-cp1258
> EOF
> test -r "$ENC_FILE" && sed -e 's/#.*//' "$ENC_FILE" 
> ) | while read encoding; do
> echo "-a $encoding"
> done`

How about

ENCODINGS=`(
cd /usr/X11R6/lib/X11/fonts/encodings && ls microsoft-cp* | sed -e 's/.enc$//'
test -r "$ENC_FILE" && sed -e 's/#.*$//' -e '/^ *$/d' "$ENC_FILE"
) | sed -e 's/^/-a /'`

?

> (
> cat << EOF
> /usr/X11R6/lib/X11/fonts/100dpi
> /usr/X11R6/lib/X11/fonts/75dpi
> /usr/X11R6/lib/X11/fonts/misc
> /usr/X11R6/lib/X11/fonts/CID
> /usr/X11R6/lib/X11/fonts/TTF
> /usr/X11R6/lib/X11/fonts/Type1
> /usr/X11R6/lib/X11/fonts/cyrillic
> /usr/X11R6/lib/X11/fonts/local
> EOF
> test -r "$DIR_FILE" && sed 's/#.*//' "$DIR_FILE" 
> ) | while read fontdir; do

Again, what about something like

(
ls -d /usr/X11R6/lib/X11/fonts/*
test -r "$DIR_FILE" && sed -e 's/#.*$//' -e '/^ *$/d' "$DIR_FILE"
) | while read fontdir; do

here?

> if test -d "$fontdir"; then
> need_update=""
> test -e "$fontdir/fonts.dir" || need_update=1
> test -e "$fontdir/fonts.scale" || need_update=1
> test -n "$need_update" || \
> test "$ENC_FILE" -nt "$fontdir/fonts.dir" && need_update=1
> test -n "$need_update" || \
> find "$fontdir" -not '(' \
> -name fonts.scale -o \
> -name fonts.dir -o \
> -name encodings.dir -o \
> -name fonts.cache-1 ')' \
> -a '(' \
> -newer "$fontdir/fonts.dir" -o \
> -newer "$fontdir/fonts.scale" \
> ')' \
> -mindepth 1 -follow | read line && need_update=1 
> if test -n "$need_update"; then 
> echo "updating $fontdir" >&2
> rm -f "$fontdir/fonts.scale"
> rm -f "$fontdir/fonts.dir"
> mkfontscale $ENCODINGS "$fontdir" || rm -f "$fontdir/fonts.scale"
> mkfontscale -b -s -l $ENCODINGS "$fontdir" || rm -f "$fontdir/fonts.dir"
> fc-cache "$fontdir"
> else
> echo "$fontdir is up-todate. skipping" >&2
> fi
> else
> echo "$fontdir is not a directory. skipping" >&2
> fi
> done 

I'm sure there's a way to make the above shorter, but if it works, why 
bother?  Looks reasonable.
Thanks,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


Re: fonts and symbolic links

2004-08-25 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Igor Pechtchanski wrote:

> > I think of adding a wrapper which reads directories and encodings from
> > configfiles (+some builtins) and does the fontdir update for us.
> 
> Yep, that'd be great.  Thanks.

check the attached script.

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723#!/bin/sh
#
# Update font information for X11
#
# Creates fonts.scale, fonts.dir and fonts.cache-1
#
PATH="$PATH:/usr/X11R6/bin"
#
# /etc/X11/font-encodings contains one encoding per line
# /etc/X11/font-dirs contains one fontdir per line
ENC_FILE=/etc/X11/font-encodings
DIR_FILE=/etc/X11/font-dirs

#
# Build ENCODINGS parameter. This is ugly. Who can do it better?
#
ENCODINGS=`
(
cat << EOF
microsoft-cp1250
microsoft-cp1251
microsoft-cp1252
microsoft-cp1253
microsoft-cp1254
microsoft-cp1255
microsoft-cp1256
microsoft-cp1257
microsoft-cp1258
EOF
test -r "$ENC_FILE" && sed -e 's/#.*//' "$ENC_FILE" 
) | while read encoding; do
echo "-a $encoding"
done`

(
cat << EOF
/usr/X11R6/lib/X11/fonts/100dpi
/usr/X11R6/lib/X11/fonts/75dpi
/usr/X11R6/lib/X11/fonts/misc
/usr/X11R6/lib/X11/fonts/CID
/usr/X11R6/lib/X11/fonts/TTF
/usr/X11R6/lib/X11/fonts/Type1
/usr/X11R6/lib/X11/fonts/cyrillic
/usr/X11R6/lib/X11/fonts/local
EOF
test -r "$DIR_FILE" && sed 's/#.*//' "$DIR_FILE" 
) | while read fontdir; do
if test -d "$fontdir"; then
need_update=""
test -e "$fontdir/fonts.dir" || need_update=1
test -e "$fontdir/fonts.scale" || need_update=1
test -n "$need_update" || \
test "$ENC_FILE" -nt "$fontdir/fonts.dir" && need_update=1
test -n "$need_update" || \
find "$fontdir" -not '(' \
-name fonts.scale -o \
-name fonts.dir -o \
-name encodings.dir -o \
-name fonts.cache-1 ')' \
-a '(' \
-newer "$fontdir/fonts.dir" -o \
-newer "$fontdir/fonts.scale" \
')' \
-mindepth 1 -follow | read line && need_update=1 
if test -n "$need_update"; then 
echo "updating $fontdir" >&2
rm -f "$fontdir/fonts.scale"
rm -f "$fontdir/fonts.dir"
mkfontscale $ENCODINGS "$fontdir" || rm -f "$fontdir/fonts.scale"
mkfontscale -b -s -l $ENCODINGS "$fontdir" || rm -f "$fontdir/fonts.dir"
fc-cache "$fontdir"
else
echo "$fontdir is up-todate. skipping" >&2
fi
else
echo "$fontdir is not a directory. skipping" >&2
fi
done 



Re: fonts and symbolic links

2004-08-25 Thread Igor Pechtchanski
On Wed, 25 Aug 2004, Alexander Gottwald wrote:

> On Wed, 25 Aug 2004, Alexander Gottwald wrote:
> 
> > On Wed, 25 Aug 2004, Igor Pechtchanski wrote:
> > > Ah, I see now.  One more question: the above commands seem to ignore all 
> > > of the "microsoft-cp12*" encodings except "microsoft-cp1252".  I found 
> > > that I needed to add an explicit "-a microsoft-cp1251" flag if I wanted 
> > > the "microsoft-cp1251" encoding to be included.  Why is that, and where is 
> > > the default list of encodings coming from?
> 
> > Hm. There is a file encodings.dir in /usr/X11R6/lib/X11/fonts/Type1.
> > Does it work if you copy it to the TTF directory?

Nope.  But, FWIW, I was thinking of doing exactly what you proposed below.  
IMO, all of the "microsoft-cp12*" encodings should be added as default for 
Cygwin/X, since those are what Windows uses.

> It is hardcoded into mkfontscale. 
> 
> { "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
>   "iso8859-6", "iso8859-6.8", "iso8859-6.8x", "iso8859-6.16",
>   "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
>   "iso8859-11", "iso8859-12", "iso8859-13", "iso8859-14",
>   "iso8859-15", "iso8859-16",
>   "ansi-1251", "koi8-r", "koi8-u", "koi8-ru", "koi8-e", "koi8-uni",
>   "tis620-2",
>   "sun.unicode.india-0", "suneu-greek",
>   "adobe-standard", "adobe-symbol",
>   "ibm-cp437", "ibm-cp850", "ibm-cp852", "ibm-cp866", "microsoft-cp1252",
>   /* But not "adobe-dingbats", as it uses generic glyph names. */
>   "cns11643-1", "cns11643-2", "cns11643-3",
>   "jisx0201.1976-0", "jisx0208.1983-0", "jisx0208.1990-0",
>   "jisx0212.1990-0", "big5-0", "big5.eten-0", "big5hkscs-0",
>   "gb2312.1980-0", "gb18030.2000-0", "gb18030.2000-1",
>   "ksc5601.1987-0", "ksc5601.1992-3"};
> 
> I think of adding a wrapper which reads directories and encodings from
> configfiles (+some builtins) and does the fontdir update for us.

Yep, that'd be great.  Thanks.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


Re: fonts and symbolic links

2004-08-25 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Alexander Gottwald wrote:

> On Wed, 25 Aug 2004, Igor Pechtchanski wrote:
> > Ah, I see now.  One more question: the above commands seem to ignore all 
> > of the "microsoft-cp12*" encodings except "microsoft-cp1252".  I found 
> > that I needed to add an explicit "-a microsoft-cp1251" flag if I wanted 
> > the "microsoft-cp1251" encoding to be included.  Why is that, and where is 
> > the default list of encodings coming from?

It is hardcoded into mkfontscale. 

{ "iso8859-1", "iso8859-2", "iso8859-3", "iso8859-4", "iso8859-5",
  "iso8859-6", "iso8859-6.8", "iso8859-6.8x", "iso8859-6.16",
  "iso8859-7", "iso8859-8", "iso8859-9", "iso8859-10",
  "iso8859-11", "iso8859-12", "iso8859-13", "iso8859-14",
  "iso8859-15", "iso8859-16",
  "ansi-1251", "koi8-r", "koi8-u", "koi8-ru", "koi8-e", "koi8-uni",
  "tis620-2",
  "sun.unicode.india-0", "suneu-greek",
  "adobe-standard", "adobe-symbol",
  "ibm-cp437", "ibm-cp850", "ibm-cp852", "ibm-cp866", "microsoft-cp1252",
  /* But not "adobe-dingbats", as it uses generic glyph names. */
  "cns11643-1", "cns11643-2", "cns11643-3",
  "jisx0201.1976-0", "jisx0208.1983-0", "jisx0208.1990-0",
  "jisx0212.1990-0", "big5-0", "big5.eten-0", "big5hkscs-0",
  "gb2312.1980-0", "gb18030.2000-0", "gb18030.2000-1",
  "ksc5601.1987-0", "ksc5601.1992-3"};

I think of adding a wrapper which reads directories and encodings from
configfiles (+some builtins) and does the fontdir update for us.

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: fonts and symbolic links

2004-08-25 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Igor Pechtchanski wrote:

> Sorry for the mess-up above, that should have been "`cygpath -W`/Fonts" 
> (but you still need the quotes).

right.

> > > > mkfontscale -b -l /usr/X11R6/lib/X11/fonts/windows
> > > 
> > > Is "ttmkfdir" needed here too?
> > 
> > no. mkfontscale (and mkfontdir which is just a wrapper for mkfontscale)
> > can handle all true type fonts.
> > 
> > the wrapper mkfontdir looks like
> > exec /usr/X11R6/bin/mkfontscale -b -s -l "$@"
> > 
> > -b: read bitmap fonts 
> > -s: ignore scalable fonts
> > 
> > the correct way to setup a font dir is
> > mkfontscale $dir# scan Truetype fonts
> > mkfontscale -b -s -l $dir   # scan bitmap fonts
> 
> Ah, I see now.  One more question: the above commands seem to ignore all 
> of the "microsoft-cp12*" encodings except "microsoft-cp1252".  I found 
> that I needed to add an explicit "-a microsoft-cp1251" flag if I wanted 
> the "microsoft-cp1251" encoding to be included.  Why is that, and where is 
> the default list of encodings coming from?

Hm. There is a file encodings.dir in /usr/X11R6/lib/X11/fonts/Type1.
Does it work if you copy it to the TTF directory?

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: fonts and symbolic links

2004-08-25 Thread Igor Pechtchanski
On Wed, 25 Aug 2004, Alexander Gottwald wrote:

> On Wed, 25 Aug 2004, Igor Pechtchanski wrote:
> 
> > > mkdir -p /usr/X11R6/lib/X11/fonts/windows
> > > lndir `cygpath -W` /usr/X11R6/lib/X11/fonts/windows
> >^
> > Shouldn't this be
> > 
> > lndir "`cygpath -W`"'\Fonts' /usr/X11R6/lib/X11/fonts/windows
> > 
> 
> actually yes. missed that when copying the line

Sorry for the mess-up above, that should have been "`cygpath -W`/Fonts" 
(but you still need the quotes).

> > > mkfontscale -b -l /usr/X11R6/lib/X11/fonts/windows
> > 
> > Is "ttmkfdir" needed here too?
> 
> no. mkfontscale (and mkfontdir which is just a wrapper for mkfontscale)
> can handle all true type fonts.
> 
> the wrapper mkfontdir looks like
> exec /usr/X11R6/bin/mkfontscale -b -s -l "$@"
> 
> -b: read bitmap fonts 
> -s: ignore scalable fonts
> 
> the correct way to setup a font dir is
> mkfontscale $dir  # scan Truetype fonts
> mkfontscale -b -s -l $dir # scan bitmap fonts

Ah, I see now.  One more question: the above commands seem to ignore all 
of the "microsoft-cp12*" encodings except "microsoft-cp1252".  I found 
that I needed to add an explicit "-a microsoft-cp1251" flag if I wanted 
the "microsoft-cp1251" encoding to be included.  Why is that, and where is 
the default list of encodings coming from?
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


Re: fonts and symbolic links

2004-08-25 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Igor Pechtchanski wrote:

> > mkdir -p /usr/X11R6/lib/X11/fonts/windows
> > lndir `cygpath -W` /usr/X11R6/lib/X11/fonts/windows
>^
> Shouldn't this be
> 
> lndir "`cygpath -W`"'\Fonts' /usr/X11R6/lib/X11/fonts/windows
> 

actually yes. missed that when copying the line

> ?
> 
> > mkfontscale -b -l /usr/X11R6/lib/X11/fonts/windows
> 
> Is "ttmkfdir" needed here too?

no. mkfontscale (and mkfontdir which is just a wrapper for mkfontscale)
can handle all true type fonts.

the wrapper mkfontdir looks like
exec /usr/X11R6/bin/mkfontscale -b -s -l "$@"

-b: read bitmap fonts 
-s: ignore scalable fonts

the correct way to setup a font dir is
mkfontscale $dir# scan Truetype fonts
mkfontscale -b -s -l $dir   # scan bitmap fonts

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: fonts and symbolic links

2004-08-25 Thread Igor Pechtchanski
On Wed, 25 Aug 2004, Alexander Gottwald wrote:

> On Wed, 25 Aug 2004, Boaz Harrosh wrote:
> 
> > There is a sourceforge project for ttmkfdir. They only have ELF binaries 
> > for download. It was easier to find it on the net than to compile. I 
> > found it packaged with cygwin/XFree86 so I assumed it was a part of 
> > cygwin/XFree86.
> 
> it was but recently mkfontdir had support for TTF fonts and ttmkfdir was not 
> needed.
> 
> >  Any way, it is a part of many Linux distributions. It looks odd that 
> > cygwin that leaves within Windows will not take advantage of windows 
> > fonts. It should be part of the Basic-X package, this and the 2 fonts I 
> > specified in the 2nd letter. Than the post-Install script should prepare 
> > the windows fonts directory for use by X. The standard fonts that are 
> > now part of cygwin/X should only be optional in a different (none 
> > default) package. As they are not necessary. (and not as beautiful). And 
> > they triple the size of the base X package. (this is Just my $0.02)
> 
> Hm. That should be possible. 
> 
> something like
> 
> mkdir -p /usr/X11R6/lib/X11/fonts/windows
> lndir `cygpath -W` /usr/X11R6/lib/X11/fonts/windows
   ^
Shouldn't this be

lndir "`cygpath -W`"'\Fonts' /usr/X11R6/lib/X11/fonts/windows

?

> mkfontscale -b -l /usr/X11R6/lib/X11/fonts/windows

Is "ttmkfdir" needed here too?
Igor

> bye
>   ago

-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


Re: fonts and symbolic links

2004-08-25 Thread Alexander Gottwald
On Wed, 25 Aug 2004, Boaz Harrosh wrote:

> There is a sourceforge project for ttmkfdir. They only have ELF binaries 
> for download. It was easier to find it on the net than to compile. I 
> found it packaged with cygwin/XFree86 so I assumed it was a part of 
> cygwin/XFree86.

it was but recently mkfontdir had support for TTF fonts and ttmkfdir was not 
needed.

>  Any way, it is a part of many Linux distributions. It looks odd that 
> cygwin that leaves within Windows will not take advantage of windows 
> fonts. It should be part of the Basic-X package, this and the 2 fonts I 
> specified in the 2nd letter. Than the post-Install script should prepare 
> the windows fonts directory for use by X. The standard fonts that are 
> now part of cygwin/X should only be optional in a different (none 
> default) package. As they are not necessary. (and not as beautiful). And 
> they triple the size of the base X package. (this is Just my $0.02)

Hm. That should be possible. 

something like

mkdir -p /usr/X11R6/lib/X11/fonts/windows
lndir `cygpath -W` /usr/X11R6/lib/X11/fonts/windows
mkfontscale -b -l /usr/X11R6/lib/X11/fonts/windows

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: fonts and symbolic links

2004-08-25 Thread Boaz Harrosh
Igor Pechtchanski wrote:
Shouldn't this be "fonts.dir" (note the "s")?
 

Sorry, Its a typo, all these missing "s"s and the wrong case. I did not 
paste my actual script Just re-typed it in the mail.
The actual code is exactly as you said.

Do you Google: ?  The matches 
show that ttmkfdir is not part of the Cygwin/X distribution, so you 
must've downloaded it separately.  FWIW, I'm going to do some work with 
fonts soon, and might consider making ttmkfdir into a Cygwin package, 
installable via setup.exe.
 

 

There is a sourceforge project for ttmkfdir. They only have ELF binaries 
for download. It was easier to find it on the net than to compile. I 
found it packaged with cygwin/XFree86 so I assumed it was a part of 
cygwin/XFree86.
Any way, it is a part of many Linux distributions. It looks odd that 
cygwin that leaves within Windows will not take advantage of windows 
fonts. It should be part of the Basic-X package, this and the 2 fonts I 
specified in the 2nd letter. Than the post-Install script should prepare 
the windows fonts directory for use by X. The standard fonts that are 
now part of cygwin/X should only be optional in a different (none 
default) package. As they are not necessary. (and not as beautiful). And 
they triple the size of the base X package. (this is Just my $0.02)

I don't know how much help it is, but I found that a directory of symlinks 
(instead of a symlink to a directory) works with XWin.  So, try something 
like

ln -s /cygdrive/c/WINDOWS/Fonts/* /usr/X11R6/lib/X11/fonts/TTF
and see if it helps.
And, as you've already noticed, mount will also work.
	Igor
 

I like the mount way so I'll keep it. It might be considered by 
cygwin1.dll teem to change symlinks to directories from windows 
shortcut-files to mount points. As it looks like the current way is not 
so transparent for UNIX applications.

Thank you very much for your reply, and grate work to all the X teem. It 
is totally production ready.

Free life
Boaz


Re: fonts and symbolic links

2004-08-24 Thread Igor Pechtchanski
On Tue, 24 Aug 2004, Boaz Harrosh wrote:

> As I am trying to pack a minimum X installation
> (see:http://cygwin.com/ml/cygwin-xfree/2004-07/msg00207.html)
> 
> I have played around with using windows fonts and only supplying the smallest
> possible fonts in download.
> I have done the following:
> 1) run> mkfontdir -  in the /cygdrive/c/windows/font/ directory
> 2) run> ttmkfdir.exe >> font.dir - I found ttmkfdir.exe in an old cygwin/xfree
  
Shouldn't this be "fonts.dir" (note the "s")?

> (not x.org) installation. It is very useful still. I suggest someone updates
> it to the new x.org package or should I have used something else?

Do you Google: ?  The matches 
show that ttmkfdir is not part of the Cygwin/X distribution, so you 
must've downloaded it separately.  FWIW, I'm going to do some work with 
fonts soon, and might consider making ttmkfdir into a Cygwin package, 
installable via setup.exe.

> [Q] if I run> ln -s /cygdrive/c/windows/font/ /usr/X11r6/lib/X11/fonts/TTF -
  ^
Should this be "Fonts" (note the "s")?  Also, Cygwin is sometimes 
configured to be case-sensitive, and it's always better to use the correct 
filename case.  That would make it (by default) something like 
/cygdrive/c/WINDOWS/Fonts.  I'd also suggest removing the trailing slash 
("/") from the ln command, just in case.

> On load, XWin.log will still complain about /usr/X11r6/lib/X11/fonts/TTF been
> not loadable.
> But if I deep copy > cp /cygdrive/c/windows/font/*
> /usr/X11r6/lib/X11/fonts/TTF/ - than it is OK. Why would XWin not follow the
> symbolic link prepared by cygwin1.dll? This is Important as it is a big
> Resource and I don't want to duplicate windows font directory.

I don't know how much help it is, but I found that a directory of symlinks 
(instead of a symlink to a directory) works with XWin.  So, try something 
like

ln -s /cygdrive/c/WINDOWS/Fonts/* /usr/X11R6/lib/X11/fonts/TTF

and see if it helps.
And, as you've already noticed, mount will also work.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw


Re: fonts and symbolic links

2004-08-24 Thread Boaz Harrosh
Boaz Harrosh wrote:
As I am trying to pack a minimum X installation 
(see:http://cygwin.com/ml/cygwin-xfree/2004-07/msg00207.html)

I have played around with using windows fonts and only supplying the 
smallest possible fonts in download.
I have done the following:
1) run> mkfontdir -  in the /cygdrive/c/windows/font/ directory
2) run> ttmkfdir.exe >> font.dir - I found ttmkfdir.exe in an old 
cygwin/xfree (not x.org) installation. It is very useful still. I 
suggest someone updates it to the new x.org package or should I have 
used something else?

[Q] if I run> ln -s /cygdrive/c/windows/font/ 
/usr/X11r6/lib/X11/fonts/TTF - On load, XWin.log will still complain 
about /usr/X11r6/lib/X11/fonts/TTF been not loadable.
But if I deep copy > cp /cygdrive/c/windows/font/* 
/usr/X11r6/lib/X11/fonts/TTF/ - than it is OK. Why would XWin not 
follow the symbolic link prepared by cygwin1.dll? This is Important as 
it is a big Resource and I don't want to duplicate windows font 
directory.

I managed to work around the symbolic links problem with mounting 
c:\windows\fonts on /usr/X11r6/lib/X11/fonts/TTF/ so I have my Install 
do that and it works. Even though its name is TTF it will actually 
include all the windows fonts 95% of which are usable by XWin. Good Job 
X.org for supporting all these windows font formats.

2 Issues remain.
1- The original one why links don't work. 2 - what's with ttmkfdir.exe 
can/should it be included in cygwin/X?
( It was included in cygwin/XFree. Since the move to X.org it is no 
longer there)

If any one wants to know:
Additional to the preparation of the windows fonts to be used by 
cygwin/X one needs the following files:
1) in /usr/X11r6/lib/X11/fonts/misc/
   6x12.pcf.gz
   cursor.pcf.gz
   fonts.alias
   fonts.dir
(see 2 attached text files)
2) The original contents of  fonts/encodings/ (0.5Mg)
3) Original contents of  /fonts/util (0.2Meg)
3) All other fonts/ dirs can be removed. X11r6/bin can be trimmed down 
to 1/2 a dozen files.

And thats it Nothing else need changed. The original X11r6/ installation 
was 24Mg now it is down to 3.5Mg including extras.

And I am sorry to say that now (using the windows fonts) it looks much 
(^2) better.

Free Life
Boaz

fixed-misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso10646-1
2
6x12.pcf.gz -misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso10646-1
cursor.pcf.gz cursor


fonts and symbolic links

2004-08-24 Thread Boaz Harrosh
As I am trying to pack a minimum X installation 
(see:http://cygwin.com/ml/cygwin-xfree/2004-07/msg00207.html)

I have played around with using windows fonts and only supplying the 
smallest possible fonts in download.
I have done the following:
1) run> mkfontdir -  in the /cygdrive/c/windows/font/ directory
2) run> ttmkfdir.exe >> font.dir - I found ttmkfdir.exe in an old 
cygwin/xfree (not x.org) installation. It is very useful still. I 
suggest someone updates it to the new x.org package or should I have 
used something else?

[Q] if I run> ln -s /cygdrive/c/windows/font/ 
/usr/X11r6/lib/X11/fonts/TTF - On load, XWin.log will still complain 
about /usr/X11r6/lib/X11/fonts/TTF been not loadable.
But if I deep copy > cp /cygdrive/c/windows/font/* 
/usr/X11r6/lib/X11/fonts/TTF/ - than it is OK. Why would XWin not follow 
the symbolic link prepared by cygwin1.dll? This is Important as it is a 
big Resource and I don't want to duplicate windows font directory.