Op zaterdag 21 december 2002 23:43, schreef James Ogley:
* getmsttfonts - to replace the crippled fetchmsttfonts included in 8.1
RPMS for MS fonts are provided via this site: http://avi.alkalay.net/software/msfonts/ The developer looks for reports that acknowledge that the rpms work on SuSE. Perhaps James can compare his packages with the ones provided by the site mentioned above?
Ho ho ho
Santa
-- Richard Bos Without a home the journey is endless
RPMS for MS fonts are provided via this site: http://avi.alkalay.net/software/msfonts/ The developer looks for reports that acknowledge that the rpms work on SuSE. Perhaps James can compare his packages with the ones provided by the site mentioned above?
My packages won't actually include the packages themselves, they'll do the same as the script that SuSE used to provide did. You'll be presented with the EULA for the fonts and asked if you accept it, if you do, it will download the fonts (although now from corefonts.sf.net) and it'll install them. It'll then use the SuSEconfig fonts module to set them up for X. The funny thing is that I'd installed these fonts manually, configured the fonts.scale and fonts.dir etc etc many times, but every time I ran SuSEconfig, it nuked the config, unless I did it with this script - weird no? -- James Ogley, Webmaster, Rubber Turnip james@rubberturnip.org.uk http://www.rubberturnip.org.uk Jabber: riggwelter@myjabber.net Using Free Software since 1994, running GNU/Linux (SuSE 8.1). GNOME updates for SuSE: http://www.usr-local-bin.org
James Ogley <james@usr-local-bin.org> さんは書きました:
It'll then use the SuSEconfig fonts module to set them up for X.
The funny thing is that I'd installed these fonts manually, configured the fonts.scale and fonts.dir etc etc many times, but every time I ran SuSEconfig, it nuked the config, unless I did it with this script - weird no?
SuSEconfig.fonts on SuSE Linux <= 8.1 always overwrites fonts.scale. It merges the contents of all files named fonts.scale.<something> into fonts.scale. Therefore, if you want to manually edit entries for fonts, edit a file like fonts.scale.my-private-entries. This will then be merged into the generated fonts.scale file by SuSEconfig.fonts. Don't edit fonts.scale directly. The fetchmsttfonts script did the same, it used mkfontscale to generate a fonts.scale.msttfonts file which was merged into fonts.scale by SuSEconfig.fonts. I just rewrote /sbin/conf.d/SuSEconfig.fonts for SuSE Linux >= 8.2 to do some more stuff automatically. If you like you can test it, the new scripts are here: http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/SuSEconfig.fonts http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config.1.gz I tested them on SuSE Linux 8.1 and on the current beta, they might work for older versions as well but I haven't tried. To use the new scripts, copy the above 3 files to /sbin/conf.d/SuSEconfig.fonts /usr/sbin/fonts-config /usr/share/man/man1/fonts-config.1.gz and call /usr/sbin/fonts-config --force as root. Actually /sbin/conf.d/SuSEconfig.fonts itself does almost nothing now. I found it too difficult to extend the bash script SuSEconfig.fonts, therefore I removed almost everything from SuSEconfig.fonts and made it just call the perl-script /usr/sbin/fonts-config which does the real work. How it works is described in the man page of the new fonts-config script which I append here: FONTS-CONFIG(1) FONTS-CONFIG(1) NAME fonts-config - configures installed X11 fonts. SYNOPSIS fonts-config [OPTION]... OPTIONS -f, --force Force the update of all generated files even if it appears to be unnecessary according to the time stamps. -q, --quiet Work silently, unless an error occurs. -v, --verbose Print some progress messages to standard output. -d, --debug Print a lot of debugging messages to standard output. --no-gs-fontmap skip generation of a Fontmap for Ghostscript (to save some time when such a Fontmap is not needed). --version Display version and exit. -h, --help Display a short help message and exit. DESCRIPTION Configures installed X11 fonts. Basically it does the fol- lowing things: call fc-cache creates an index of FreeType font files in a directory for use with client side font rendering via libXft, see fc-cache(1). call cidfont-x11-config cidfont-x11-config is another little perl script which configures CID-keyed fonts for use with X11, see cid- font-x11-config(1). creates fonts.scale and fonts.dir files To find the list of directories currently used for server side fonts, /etc/X11/XF86Config is parsed and merged with a hardcoded list of directories. If the font server xfs is running, /etc/X11/fs/config is also parsed and the list of directories found there is merged as well. For each directory from this list, the time stamps of the directory, the fonts.scale file, the fonts.dir file and an extra time stamp file .fonts-config-times- tamp are checked. If not all the time stamps are equal or any of these files is missing, the fonts.scale and fonts.dir files will be updated as follows: First of all a fonts.scale file is created by calling mkfontscale. Then, the entries found in the fonts.scale file are merged with the entries from all fonts.scale.* files. fonts.scale.* files may be supplied by rpm-packages or manually added by the user to override or amend the entries created automatically by mkfontscale. Entries in a fonts.scale.* file have higher priority than entries automatically created by mkfontscale. All entries generated automatically by mkfontscale for a certain font file are discarded if any fonts.scale.* file contains an entry for the same font file. If the xtt module is configured to load in /etc/X11/XF86Config, additional entries may be created to make use of the artificial bold and italic features of xtt. The time stamp of /etc/X11/XF86Config is not checked, i.e. you have to use fonts-config --force after editing /etc/X11/XF86Config to switch between the xtt and freetype modules. After the final list of entries has been written back to fonts.scale, mkfontdir is called. Finally, the time stamps of the directory, fonts.scale, fonts.dir, and .fonts-config-timestamp are set to the time when fonts-config started. If any fonts.scale file in the directory list needed an update, a Ghostcript Fontmap is also generated for all scalable fonts in the directory list and the result is written to /usr/share/ghostscript/*/lib/Fontmap.X11-auto. Usually fonts-config is called automatically via SuSEcon- fig (SuSEconfig --module fonts), which is usually automat- ically called by YaST2. But you can also execute fonts- config directly, which is mainly useful to debug it. AUTHOR Mike FABIAN <mfabian@suse.de>, 2003. SEE ALSO fc-cache(1), cidfont-x11-config(1), mkfontdir(1), mkfontscale(1) perl v5.8.0 2003-01-27 FONTS-CONFIG(1) -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Mike FABIAN <mfabian@suse.de> さんは書きました:
James Ogley <james@usr-local-bin.org> さんは書きました:
It'll then use the SuSEconfig fonts module to set them up for X.
The funny thing is that I'd installed these fonts manually, configured the fonts.scale and fonts.dir etc etc many times, but every time I ran SuSEconfig, it nuked the config, unless I did it with this script - weird no?
SuSEconfig.fonts on SuSE Linux <= 8.1 always overwrites fonts.scale. It merges the contents of all files named fonts.scale.<something> into fonts.scale.
I think what I wrote above is misleading. SuSEconfig.fonts on SuSE Linux >= 8.2 will also overwrite fonts.scale.
Therefore, if you want to manually edit entries for fonts, edit a file like fonts.scale.my-private-entries. This will then be merged into the generated fonts.scale file by SuSEconfig.fonts. Don't edit fonts.scale directly.
This is still valid with the new SuSEconfig.fonts as well. The difference is only that the new SuSEconfig.fonts/fonts-config scripts do a bit more stuff automatically, therefore manual tweaking of the fonts.scale.* file will not be necessary in many cases. For most TrueType fonts it should be enough to copy them into /usr/X11R6/lib/X11/fonts/truetype or some other directory in the X11 font path and run "SuSEconfig --module fonts". The fonts.scale which is then automatically generated is OK in many cases. Only if the auto generated fonts.scale contains wrong entries or lacks some important entries, manually adding a fonts.scale.<something> file is still necessary. If entries for a certain font exist in a fonts.scale.* file, all automatically generated entries will be discarded. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On January 27, 2003 10:37 am, Mike FABIAN wrote: Hello Mike:
I just rewrote /sbin/conf.d/SuSEconfig.fonts for SuSE Linux >= 8.2 to do some more stuff automatically.
Nice, but it seem to have problems generating Fontmap files, the script terminates with this error: Use of uninitialized value in pattern match (m//) at /usr/sbin/fonts-config line 284 I guess that is why you have it turned off in SuSEconfig.fonts. There is still one thing missing in the font system: the aliasing of QT font names to Ghostscript font names. I didn't realize this problem exist until I switch to Koffice and none to my fonts will print correctly. I found the answer by reading the Koffice FAQ and all my fonts are working now, but manually tweaking Fontmap.GS when one have a large number of fonts is no fun ;-(. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+NedA3epPyyKbwPYRArgzAKC1mq4uOLMdNqoBk3mxHBgxmCkH9ACgkDsB L0tyHBk/bi0mhOfRnY9tFGs= =LZw9 -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 27, 2003 10:37 am, Mike FABIAN wrote:
Hello Mike:
I just rewrote /sbin/conf.d/SuSEconfig.fonts for SuSE Linux >= 8.2 to do some more stuff automatically.
Nice, but it seem to have problems generating Fontmap files, the script terminates with this error:
Use of uninitialized value in pattern match (m//) at /usr/sbin/fonts-config line 284
I guess that is why you have it turned off in SuSEconfig.fonts.
No, it is only turned off to save some time during installation. SuSEconfig.fonts will always run at the end of the installation. Generating the Fontmap file takes a few more seconds and probably only very few people need that Fontmap file. Generating the Fontmap file works fine for me. Can you give me more detailed information about the error occuring on your system? Maybe send me the output of '/usr/sbin/fonts-config --force --debug'? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
* On Tuesday 28 January 2003 06:07 am, Mike FABIAN wrote:
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 27, 2003 10:37 am, Mike FABIAN wrote:
Hello Mike:
I just rewrote /sbin/conf.d/SuSEconfig.fonts for SuSE Linux >= 8.2 to do some more stuff automatically.
Nice, but it seem to have problems generating Fontmap files, the script terminates with this error:
Use of uninitialized value in pattern match (m//) at /usr/sbin/fonts-config line 284
I guess that is why you have it turned off in SuSEconfig.fonts.
No, it is only turned off to save some time during installation. SuSEconfig.fonts will always run at the end of the installation. Generating the Fontmap file takes a few more seconds and probably only very few people need that Fontmap file.
Generating the Fontmap file works fine for me.
Can you give me more detailed information about the error occuring on your system?
Maybe send me the output of '/usr/sbin/fonts-config --force --debug'?
--======================== Hi Mike, I wanted to drop by and affirm that your new scripts work ok for me as well. No errors things are generated nicely and this somehow seems to be a much more efficient way of doing the config now. Haven't done full testing yet, but will send an alert if something seems not to work right. Thanks Patrick --- KMail v1.4.3 --- SuSE Linux Pro v8.1 --- Registered Linux User #225206 On any other day, that might seem strange...
On January 28, 2003 06:07 am, Mike FABIAN wrote: Actually it worked for me too, I was just look at the wrong place, sorry. Even though the script generates everything properly does terminated with the error: Use of uninitialized value in pattern match (m//) at /usr/sbin/fonts-config line 284 Charles
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 28, 2003 06:07 am, Mike FABIAN wrote:
Actually it worked for me too, I was just look at the wrong place, sorry. Even though the script generates everything properly does terminated with the error:
Use of uninitialized value in pattern match (m//) at /usr/sbin/fonts-config line 284
I can't reproduce that. Does '/usr/sbin/fonts-config --force --debug' give any useful output? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
There is still one thing missing in the font system: the aliasing of QT font names to Ghostscript font names. I didn't realize this problem exist until I switch to Koffice and none to my fonts will print correctly. I found the answer by reading the Koffice FAQ and all my fonts are working now, but manually tweaking Fontmap.GS when one have a large number of fonts is no fun ;-(.
I added the automatic generation of a few reasonable aliases. According to what is written at http://www.koffice.org/faq/ and http://koffice.kde.org/tools/Fontmap.ms the new scripts should generate all aliases needed to solve your KOffice problem. New scripts at the same place: http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/SuSEconfig.fonts http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config.1.gz The generation of the aliases will only work when /usr/bin/ftdump is the ftdump from freetype2. The /usr/bin/ftdump in SuSE Linux 8.1 is from freetype1. To replace the freetype1 /usr/bin/ftdump in SuSE Linux 8.1 by the freetype2 version, you can install the following updated freetype1 and freetype2 packages: ftp://ftp.suse.com/pub/people/mfabian/8.1-i586/freetype-1.3.1-740.i586.rpm ftp://ftp.suse.com/pub/people/mfabian/8.1-i586/freetype-tools-1.3.1-740.i586.rpm ftp://ftp.suse.com/pub/people/mfabian/8.1-i586/freetype2-2.1.3-14.i586.rpm ftp://ftp.suse.com/pub/people/mfabian/8.1-i586/freetype2-devel-2.1.3-14.i586.rpm ftp://ftp.suse.com/pub/people/mfabian/8.1-i586/ft2demos-2.1.3-10.i586.rpm the "ft2demos" packages contains the new ftdump. The "fonts-config" script will also work with the old ftdump, but it won't create the aliases then. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
On January 28, 2003 01:09 pm, Mike FABIAN wrote:
I added the automatic generation of a few reasonable aliases.
I just tried out your new scripts, nice... However, there are two problems: (1) The Alias must preceed the font mapping (this is in the FAQ) (2) I found out the hard way that all references to -Roman should be taken out for the fonts to work. Thanks, Charles
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 28, 2003 01:09 pm, Mike FABIAN wrote:
I added the automatic generation of a few reasonable aliases.
I just tried out your new scripts, nice... However, there are two problems:
(1) The Alias must preceed the font mapping (this is in the FAQ)
Although this is written in http://www.koffice.org/faq/ in section "6.1.", I don't think it is true. Look at /usr/share/ghostscript/7.05/lib/Fontmap.GS for example In that file most aliases follow the original entries for the fonts and it always worked like that. Of course I tested whether the generated aliases work and apparently they work no matter whether they preceed or follow the "real" font entries.
(2) I found out the hard way that all references to -Roman should be taken out for the fonts to work.
Example? Do you mean aliases like /ArialBlack-Roman /Arial_Black ; in http://www.koffice.org/faq/? My script doesn't generate that alias, for the "Arial-Black" font it only generates: %---------------------------------------------------------------------- % postscript: "Arial-Black" family: "Arial Black" style: "Regular" /Arial-Black (/usr/X11R6/lib/X11/fonts/truetype/ariblk.ttf) ; /ArialBlack /Arial-Black ; /ArialBlack-Regular /Arial-Black ; %---------------------------------------------------------------------- i.e. in addition to the entry using the "real" PostScript name of the font, an alias /$family-$style /$postscript ; is created with all spaces from $family and $style removed. If $style happens to be "Regular" or is empty, an additional alias of the form /$family /$postscript ; is generated. Where's the problem? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On January 29, 2003 05:05 am, Mike FABIAN wrote:
Of course I tested whether the generated aliases work and apparently they work no matter whether they preceed or follow the "real" font entries.
Did you try it in Kword?
Example?
Do you mean aliases like
/ArialBlack-Roman /Arial_Black ;
No, I am talking about actual fontmap entries generated both by the kwdfont script and your script. Here is an example: %---------------------------------------------------------------------- % postscript: "ClassicalGaramondBT-Roman" family: "ClassGarmnd BT" style: "Roman" /ClassicalGaramondBT-Roman (/usr/X11R6/lib/X11/fonts/truetype/clsgaran.ttf) ; /ClassGarmndBT-Roman /ClassicalGaramondBT-Roman ; %---------------------------------------------------------------------- The above is generated by your script. As you can see the alias is ClassGarmndBT-Roman which does not work. The actual font alias can be seen when one generate a postscipt file from Kword which is ClassGarmndBT. This applies to all alias with the -Roman suffix. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+N+Hf3epPyyKbwPYRAnoBAKCjJiA3A2F2nSUFXDvyQ7PfOOjeigCeOM/o dxFbtS6eXLWx73qIN6MOPjs= =+fGT -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 29, 2003 05:05 am, Mike FABIAN wrote:
Of course I tested whether the generated aliases work and apparently they work no matter whether they preceed or follow the "real" font entries.
Did you try it in Kword?
Yes, byt I didn't have the same fonts as you, I didn't have clsgaran.ttf.
No, I am talking about actual fontmap entries generated both by the kwdfont script and your script. Here is an example:
%---------------------------------------------------------------------- % postscript: "ClassicalGaramondBT-Roman" family: "ClassGarmnd BT" style: "Roman" /ClassicalGaramondBT-Roman (/usr/X11R6/lib/X11/fonts/truetype/clsgaran.ttf) ; /ClassGarmndBT-Roman /ClassicalGaramondBT-Roman ; %----------------------------------------------------------------------
The above is generated by your script. As you can see the alias is ClassGarmndBT-Roman which does not work. The actual font alias can be seen when one generate a postscipt file from Kword which is ClassGarmndBT. This applies to all alias with the -Roman suffix.
I got the Bitstream Vera fonts today and could reproduce the problem with the Bitstream Vera Sans. I changed "fonts-config" now to add an extra alias without "-Roman". For the Bitstream Vera Sans the generated entry now looks like %---------------------------------------------------------------------- % postscript: "BitstreamVeraSans-Roman" family: "Bitstream Vera Sans" style: "Roman" /BitstreamVeraSans-Roman (/usr/X11R6/lib/X11/fonts/Vera/tt2001gn.ttf) ; /BitstreamVeraSans /BitstreamVeraSans-Roman ; %---------------------------------------------------------------------- which works and for your Classical Garamond it will generate: %---------------------------------------------------------------------- % postscript: "ClassicalGaramondBT-Roman" family: "ClassGarmnd BT" style: "Roman" /ClassicalGaramondBT-Roman (/usr/X11R6/lib/X11/fonts/truetype/clsgaran.ttf) ; /ClassGarmndBT /ClassicalGaramondBT-Roman ; /ClassGarmndBT-Roman /ClassicalGaramondBT-Roman ; %---------------------------------------------------------------------- For the Bitstream Vera there is one entry less because /BitstreamVeraSans-Roman /BitstreamVeraSans-Roman ; would of course make no sense, whereas /ClassGarmndBT-Roman /ClassicalGaramondBT-Roman ; is not used by the PostScript file generated by KWord but it doesn't hurt and looks reasonable. New scripts at the same place: http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/SuSEconfig.fonts http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config.1.gz -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On January 29, 2003 01:13 pm, Mike FABIAN wrote:
I got the Bitstream Vera fonts today and could reproduce the problem with the Bitstream Vera Sans. I changed "fonts-config" now to add an extra alias without "-Roman".
I have taken a look at the alias generated by the new script and they look fine. Something is still srewy though which I can't figure out: If I use the Fontmap.X11-auto file a lot of fonts would not show up, but will with my hand tweaked Fontmap.GS. The error from gs is: **** Warning: glyf overlaps cmap, truncating. The only difference I can see is that I put the alias in a section in the Fontmap.GS file before the actually fonts, but changing the order in Fontmap.X11-auto does help either. I am stumped. If you whould like I can send you my Fontmap.GS and Fontmap.X11-auto privately. You might be able to figure out what is going on. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+OY9M3epPyyKbwPYRAqIOAKDBZ5XzhoBpX9b3KZM/UID6F1Z3jQCfXdhw Rf5Ofj/JkitOaf2aRa4WVrg= =veAH -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
I have taken a look at the alias generated by the new script and they look fine. Something is still srewy though which I can't figure out: If I use the Fontmap.X11-auto file a lot of fonts would not show up, but will with my hand tweaked Fontmap.GS. The error from gs is:
**** Warning: glyf overlaps cmap, truncating.
The only difference I can see is that I put the alias in a section in the Fontmap.GS file before the actually fonts, but changing the order in Fontmap.X11-auto does help either. I am stumped. ^not?
If you whould like I can send you my Fontmap.GS and Fontmap.X11-auto privately. You might be able to figure out what is going on.
Yes, please. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On January 31, 2003 04:23 am, Mike FABIAN wrote:
The only difference I can see is that I put the alias in a section in the Fontmap.GS file before the actually fonts, but changing the order in Fontmap.X11-auto does help either. I am stumped.
Silly me, I was so focused on the -Roman's that I didn't see that the alias are wrong. The problem turns out the be the case of the bt's. In the Fontmap file generated by your script all bt's are in uppercase, ie. BT, where as QT uses Bt with the exception of font names with Win95 in it (which uses bt).
If you whould like I can send you my Fontmap.GS and Fontmap.X11-auto privately. You might be able to figure out what is going on.
I have sent you my Fontmap.GS and Fontmap.X11-auto so you can compare. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+Ow5J3epPyyKbwPYRApY6AJwJEoVniiR5uoRm8fC7ZZS711mqdACgrKe0 QaFDO551CzI7lw5lLTX+Jjo= =+ApY -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On January 31, 2003 04:23 am, Mike FABIAN wrote:
The only difference I can see is that I put the alias in a section in the Fontmap.GS file before the actually fonts, but changing the order in Fontmap.X11-auto does help either. I am stumped.
Silly me, I was so focused on the -Roman's that I didn't see that the alias are wrong. The problem turns out the be the case of the bt's. In the Fontmap file generated by your script all bt's are in uppercase, ie. BT, where as QT uses Bt with the exception of font names with Win95 in it (which uses bt).
If you whould like I can send you my Fontmap.GS and Fontmap.X11-auto privately. You might be able to figure out what is going on.
I have sent you my Fontmap.GS and Fontmap.X11-auto so you can compare.
Thank you. I updated the fonts-config script again and hope that it works now for your fonts as well: http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/SuSEconfig.fonts http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config http://www.suse.de/~mfabian/misc/SuSEconfig.fonts/fonts-config.1.gz The new version tries to construct aliases from the XLFDs. Apparently Qt3 tries to guess the PostScript name from the XLFD when fontembedding is not enabled in qtconfig. After looking at your Fontmap.GS and the source code of Qt3 (qt-x11-free-3.1.1/src/kernel/qpsprinter.cpp), I think that Qt3 does construct the PostScript name by using the family field from the XLFD. And it uppercases the first letter of each word from that field and lowercases the rest of that word, then removes all spaces. I.e. if the family field of the XLFD contains "Bank Gothic MD BT" this is converted to "BankgothicMdBt". Then "-Bold", "-Italic", or "-BoldItalic" is appended according to the weight and slant fields of the XLFD. There are a few entries in your Fontmap.GS which look very strange to me though, for example: /OmegaserifvIsCiI /OmegaSerifVISCII ; /UrWwoodtypd /URWWoodTypD ; I have now Idea where the strange mixed case in "vIsCiI" and "UrW" could come from. Does the new script work OK for you now? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 3, 2003 08:02 am, Mike FABIAN wrote:
After looking at your Fontmap.GS and the source code of Qt3 (qt-x11-free-3.1.1/src/kernel/qpsprinter.cpp), I think that Qt3 does construct the PostScript name by using the family field from the XLFD. And it uppercases the first letter of each word from that field and lowercases the rest of that word, then removes all spaces. I.e. if the family field of the XLFD contains "Bank Gothic MD BT" this is converted to "BankgothicMdBt". Then "-Bold", "-Italic", or "-BoldItalic" is appended according to the weight and slant fields of the XLFD.
I think you are correct.
I have now Idea where the strange mixed case in "vIsCiI" and "UrW" could come from.
These came for kwdfont. I tested most of the fonts, but I missed out on a few that I have never used. Thanks for catching them.
Does the new script work OK for you now?
The new script is working beautifully, so far it has only missed out a couple of fonts. For example I have a font call Allegro which according to QT is AllegroBt, but some how the alia got generated as: /Allegro /AllegroBT-Regular ; I think we might have a winner here. Thanks for all your help. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+QQA83epPyyKbwPYRAukwAJ9c98NNT5U1DyYmjK22MLMjJj/NhACgylXN f2xNOvqU3/3q0neM566Ty+Q= =/+3P -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
I have now Idea where the strange mixed case in "vIsCiI" and "UrW" could come from.
These came for kwdfont. I tested most of the fonts, but I missed out on a few that I have never used. Thanks for catching them.
Does the new script work OK for you now?
The new script is working beautifully, so far it has only missed out a couple of fonts. For example I have a font call Allegro which according to QT is AllegroBt, but some how the alia got generated as:
/Allegro /AllegroBT-Regular ;
How does the XLFD of this font look like? My new script also inserts the XLFDs as a comment into the generated Fontmap.X11-auto, for example like this: %---------------------------------------------------------------------- % postscript="TrebuchetMS-Italic" family="Trebuchet MS" style="Italic" % xlfd="-microsoft-Trebuchet MS-medium-o-normal--0-0-0-0-p-0-koi8-e" /TrebuchetMS-Italic (/usr/X11R6/lib/X11/fonts/truetype/trebucit.ttf) ; /TrebuchetMs-Italic /TrebuchetMS-Italic ; Here you can see what information was available in the XLFD where I generate the alias from: The family name was "Trebuchet MS" making each word lower case except the first letter gives "Trebuchet Ms", removing the space gives "TrebuchetMs" Then there is "-o-" in the XLFD which means "Oblique", therefore "-Italic" is added to the alias. This doesn't work with the /AllegroBT-Regular font? Why not? Why does Qt think it is /AllegroBt if the XLFD doesn't have "Allegro BT" in the family name? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 5, 2003 10:20 am, Mike FABIAN wrote:
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
I have now Idea where the strange mixed case in "vIsCiI" and "UrW" could come from.
These came for kwdfont. I tested most of the fonts, but I missed out on a few that I have never used. Thanks for catching them.
Does the new script work OK for you now?
The new script is working beautifully, so far it has only missed out a couple of fonts. For example I have a font call Allegro which according to QT is AllegroBt, but some how the alia got generated as:
/Allegro /AllegroBT-Regular ;
How does the XLFD of this font look like?
My new script also inserts the XLFDs as a comment into the generated Fontmap.X11-auto, for example like this:
%---------------------------------------------------------------------- % postscript="TrebuchetMS-Italic" family="Trebuchet MS" style="Italic" % xlfd="-microsoft-Trebuchet MS-medium-o-normal--0-0-0-0-p-0-koi8-e" /TrebuchetMS-Italic (/usr/X11R6/lib/X11/fonts/truetype/trebucit.ttf) ; /TrebuchetMs-Italic /TrebuchetMS-Italic ;
Here you can see what information was available in the XLFD where I generate the alias from: The family name was "Trebuchet MS" making each word lower case except the first letter gives "Trebuchet Ms", removing the space gives "TrebuchetMs" Then there is "-o-" in the XLFD which means "Oblique", therefore "-Italic" is added to the alias.
This doesn't work with the /AllegroBT-Regular font? Why not? Why does Qt think it is /AllegroBt if the XLFD doesn't have "Allegro BT" in the family name? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+QYBF3epPyyKbwPYRAv8mAKDO2bCyoimG+YUcFW7BZvRCF4mbqQCeOUNf hlAqwFzUF5yFXVagbcpKKlU= =VCgK -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 5, 2003 10:20 am, Mike FABIAN wrote: Sorry about the last message... hit the wrong button ;-(.
How does the XLFD of this font look like?
Here is the full version: % postscript="AllegroBT-Regular" family="Allegro BT" style="Regular" % xlfd="-Bitstream-Allegro-medium-r-condensed--0-0-0-0-p-0-iso8859-9" /AllegroBT-Regular (/usr/X11R6/lib/X11/fonts/truetype/allegron.ttf) ; /Allegro /AllegroBT-Regular ;
This doesn't work with the /AllegroBT-Regular font? Why not? Why does Qt think it is /AllegroBt if the XLFD doesn't have "Allegro BT" in the family name?
The BT is not in the XLFD, but is is in the postscript name. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+QYEn3epPyyKbwPYRAoGbAKCGPWf+Ubdgv8dMNUcV08/eog/f+gCgotGl t/lZxxc+Tvb2IkTpT2vq/tM= =k0Ns -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On February 5, 2003 10:20 am, Mike FABIAN wrote:
Sorry about the last message... hit the wrong button ;-(.
How does the XLFD of this font look like?
Here is the full version:
% postscript="AllegroBT-Regular" family="Allegro BT" style="Regular" % xlfd="-Bitstream-Allegro-medium-r-condensed--0-0-0-0-p-0-iso8859-9" /AllegroBT-Regular (/usr/X11R6/lib/X11/fonts/truetype/allegron.ttf) ; /Allegro /AllegroBT-Regular ;
This doesn't work with the /AllegroBT-Regular font? Why not? Why does Qt think it is /AllegroBt if the XLFD doesn't have "Allegro BT" in the family name?
The BT is not in the XLFD, but is is in the postscript name.
Hmm. Qt really uses the PostScript name in that case? I could generate aliases form the part of the PostScript name before the '-' as well of course. But that would probably increase the number of duplicate aliases quite a lot. If you have many fonts installed you probably already have some duplicate aliases in Fontmap.X11-auto. I've marked the duplicates in the generated Fontmap.X11-auto by uncommenting the last one and adding "% warning: duplicate!", like that: %---------------------------------------------------------------------- % postscript="ClarendonLHHeavy" family="ClarendonLH" style="Heavy" % xlfd="-misc-ClarendonLH-black-r-normal--0-0-0-0-p-0-iso8859-1" /ClarendonLHHeavy (/usr/X11R6/lib/X11/fonts/test/clarlh__.ttf) ; /ClarendonLH /ClarendonLHHeavy ; /Clarendonlh /ClarendonLHHeavy ; %---------------------------------------------------------------------- % postscript="ClarendonLHLight" family="ClarendonLH" style="Light" % xlfd="-misc-ClarendonLH-light-r-normal--0-0-0-0-p-0-iso8859-1" /ClarendonLHLight (/usr/X11R6/lib/X11/fonts/test/clarll__.ttf) ; % /ClarendonLH /ClarendonLHLight ; % warning: duplicate! % /Clarendonlh /ClarendonLHLight ; % warning: duplicate! %---------------------------------------------------------------------- In that case, Qt probably needs the alias /Clarendonlh in both cases, it looks like it can't distinguish between these two. By the way, because of the possibility of generating aliases which are identical to PostScript names or aliases used in Fontmap.GS, Fontmap.X11-auto should be included at the top of /usr/share/ghostscript/7.05/lib/Fontmap like this %! % See Fontmap.GS for the syntax of real Fontmap files. (Fontmap.X11-auto) .runlibfile (Fontmap.GS) .runlibfile (Fontmap.kanji) .runlibfile (Fontmap.rus) .runlibfile (Fontmap.CID) .runlibfile (Fontmap.greek) .runlibfile because if there are duplicate aliases/PostScript names, the last one wins. And Fontmap.GS, and the other Fontmap.* below may contain handedited stuff, which should always win against the autogenerated stuff in Fontmap.X11-auto. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 7, 2003 12:11 pm, Mike FABIAN wrote:
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
Qt really uses the PostScript name in that case?
Yes and no. The capitalisation is still done in the QT way, ie: /AllegroBt
I could generate aliases form the part of the PostScript name before the '-' as well of course. But that would probably increase the number of duplicate aliases quite a lot.
There will be some dups but can't we have the script filter them out? Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+SWWb3epPyyKbwPYRAvWiAKDHCWY7NOioBcFkrqS+sYMOBsGktACePQCj nh5kLuBtRQ7iaoVHU4vf6W8= =4GTq -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On February 7, 2003 12:11 pm, Mike FABIAN wrote:
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
Qt really uses the PostScript name in that case?
Yes and no. The capitalisation is still done in the QT way, ie:
/AllegroBt
I could generate aliases form the part of the PostScript name before the '-' as well of course. But that would probably increase the number of duplicate aliases quite a lot.
There will be some dups but can't we have the script filter them out?
The script does filter them out already. As I wrote in my last mail, I just put comment signs '%' in front of all lines with duplicates besides the first one and insert the string "% warning: duplicate!". Actually, filtering them out isn't absolutely necessary. If I didn't add the comment signs in front of the duplicates, the last duplicate would win. By commenting out all but the first one, the first one wins. If there are duplicates, only one can work anyway, it doesn't really matter whether it's the first one or the last one. The only reason why I comment out out the duplicates and add the "%warning: duplicate" string is to make it easier to find the duplicates, because you can search for "duplicate" in your favorite editor and see whether you have duplicates or not. But if producing aliases which Qt needs produces duplicates, it means that not all these fonts can work with Qt, Qt won't be able to distinguish between these fonts either. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 12, 2003 09:40 am, Mike FABIAN wrote:
The script does filter them out already.
Sorry, missed out on that one since there are no dups in my Fontmap.X11-auto.
Actually, filtering them out isn't absolutely necessary. If I didn't add the comment signs in front of the duplicates, the last duplicate would win...
You are of course correct with that. Actually I am quite happy with the script as it stands. I don't mind touching up the fontmap file until the problem is fixed within QT itself. Although a script that can generate a perfect fontmap file will be a big win for SuSE, especially with newbies, since SuSE uses KDE as the default environment. Thnks for all your hard work. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+TQJ23epPyyKbwPYRAgTHAKCOXCKUBeKVooo/8lScHN8cqtk7vACfTTD+ Tprhpi/V7d/sRle8BxMRduw= =Jgpk -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
Actually I am quite happy with the script as it stands. I don't mind touching up the fontmap file until the problem is fixed within QT itself. Although a script that can generate a perfect fontmap file will be a big win for SuSE, especially with newbies, since SuSE uses KDE as the default environment.
By the way, did you already try the fontembedding feature in Qt? You can do that with qtconfig. Just call qtconfig switch to the rightmost tab labelled "Printer" and make sure that fontembedding is enabled. Actually this is the better solution than using the aliases for Ghostscript. If you use fontembedding, the TrueType and PostScript fonts used for display will be embedded into the PostScript output. This has the small disadvantage that the PostScript file gets a bit bigger, but the huge advantage that you can take such a PostScript file with you and print anywhere on any PostScript printer or on any other system which has Ghostscript, no matter which fonts are installed on that other system or available in the PostScript printer, because the file itself already has the fonts. The aliases are only needed when the fontembedding is off. In that case Qt/KDE applications don't include the fonts into the PostScript file, they only write the name of the font into the file. Then, Ghostscript has to find that font again and needs such a Fontmap file to find the proper fonts to render that document. Such a document will then only print on a system which has Ghostscript *and* a Fontmap which has all necessary entries. The only advantage is that the PostScript files a bit smaller. I recommend to use fontembedding as the more practical solution and thus avoid the problems with the aliases completely. Nevertheless I want to make it work with the aliases as well, because some people may want to switch fontembedding of for whatever reasons, and I want to make it work by default in that case as well. To check whether you KDE programs really embed the fonts, direct the printing output to a file: Click on the print menu, there you can select somewhere that you want PostScript output into a file. Then try to view that file with gs: gs print.ps If you file does not embed all fonts, you will see some messages Loading .... font from ... like this: mfabian@magellan:~$ gs print.ps ESP Ghostscript 7.05 (2002-06-28) Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Loading BitstreamVeraSans-Roman font from /usr/X11R6/lib/X11/fonts/Vera/tt2001gn.ttf...2775920 1316395 2905116 1506272 0 done. >>showpage, press <return> to continue<< quit GS>mfabian@magellan:~$ This is using the Fontmap. If all fonts are already embedded into the PostScript file, you will see no "Loading .... font from ..." messages at all, everything is already in print.ps, Ghostscript doesn't need to load anything else in that case. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 14, 2003 12:25 pm, Mike FABIAN wrote:
By the way, did you already try the fontembedding feature in Qt?
I didn't know you have to config that explicitly. Although I have kept track of KDE since the 0.x days, it is only with 3.x that I felt that it is fast and feature rich enough to migrate to (don't want to start a flame war here, but Gnome 2 really scares me). Before I was using Window Maker and a few GTK+Gnome Apps. Now I mainly use KDE or sometimes Window Maker+GNUstep.
You can do that with qtconfig. Just call qtconfig switch to the rightmost tab labelled "Printer" and make sure that fontembedding is enabled.
Thanks for the info.
Actually this is the better solution than using the aliases for Ghostscript.
Actually I prefer the fonts to be embedded, like you said the ps files are a lot more portable.
I recommend to use fontembedding as the more practical solution and thus avoid the problems with the aliases completely.
I actually think that SuSE should switch it on by default.
Nevertheless I want to make it work with the aliases as well, because some people may want to switch fontembedding of for whatever reasons, and I want to make it work by default in that case as well.
That will be great.
Then try to view that file with gs:
Or just look at the raw text in the ps file. It is all working now. Thanks again for all the help again. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+T5km3epPyyKbwPYRAkEZAJ0Wf0P3zt8fL2LFy2la6tNkipANvwCgtQTJ ddrEctmqgCLUkbnf3Gg6ZU0= =QH1O -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On February 14, 2003 12:25 pm, Mike FABIAN wrote:
[...]
I recommend to use fontembedding as the more practical solution and thus avoid the problems with the aliases completely.
I actually think that SuSE should switch it on by default.
I thought it was already switched on by default in SuSE 8.1. Or am I mistaken? If I delete my ~/.qt/qtrc on SuSE 8.1 and start qtconfig, the tick on the fontembedding checkbox is on. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 16, 2003 01:05 pm, Mike FABIAN wrote:
I thought it was already switched on by default in SuSE 8.1. Or am I mistaken? If I delete my ~/.qt/qtrc on SuSE 8.1 and start qtconfig, the tick on the fontembedding checkbox is on.
The 8.1 on my system is from a fresh install and it wasn't on by default. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+T9g03epPyyKbwPYRAqCBAKCl/9QhrDeL+fOeSL9uo2xgFV2HkwCfToXi ZhJAmyTXyf2x18HeLE+83VM= =5pHa -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On February 16, 2003 01:05 pm, Mike FABIAN wrote:
I thought it was already switched on by default in SuSE 8.1. Or am I mistaken? If I delete my ~/.qt/qtrc on SuSE 8.1 and start qtconfig, the tick on the fontembedding checkbox is on.
The 8.1 on my system is from a fresh install and it wasn't on by default.
Strange, I must ask our Qt experts. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 16, 2003 01:50 pm, Mike FABIAN wrote:
Strange, I must ask our Qt experts.
I took a look at the qtrc file in 8.1's QT3 package and indeed font embeding is not turn on, anti-aliasing is though. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+UIQ53epPyyKbwPYRAuTJAKDQF5gxeXL+DvVXHPsSYBJCMiiYtQCfcXFu hxaTVGXchm5uEh7B2nV5XpA= =X7Gz -----END PGP SIGNATURE-----
Charles Philip Chan <cpchan@sympatico.ca> さんは書きました:
On February 16, 2003 01:50 pm, Mike FABIAN wrote:
Strange, I must ask our Qt experts.
I took a look at the qtrc file in 8.1's QT3 package and indeed font embeding is not turn on, anti-aliasing is though.
You mean /etc/X11/qtrc? Yes, I noticed as well that it doesn't contain a line setting fontembedding explicitly to true. But nevertheless the tick mark for fontembedding in qtconfig defaulted to on when I deleted my personal ~/.qt/qtrc on SuSE Linux 8.1. One of our Qt experts confirmed that the Qt source code already contains embedFonts = settings.readBoolEntry( "/qt/embedFonts", TRUE ); i.e. it should default to on if nothing about fontembedding is specified in qtrc. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On February 17, 2003 05:26 am, Mike FABIAN wrote:
You mean /etc/X11/qtrc?
Yes, and no since the copy on my harddrive have been modified. I was look at the /etc/X11/gtrc in the rpm itself.
One of our Qt experts confirmed that the Qt source code already contains
embedFonts = settings.readBoolEntry( "/qt/embedFonts", TRUE );
i.e. it should default to on if nothing about fontembedding is specified in qtrc.
Interestring. Since I only started noticing the problem after I started using Kword when I upgraded to KDE 3.1, I wonder whether: (1) The QT SuSE srpm on the KDE site don't have it turned on. (2) I have mistakenly turn it off while exploring what's new in 8.1. or (3) It was actually off. I will delete my qtrc, install QT3.05 and a QT app from SuSE, try printing and report back. Charles -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+Ub5f3epPyyKbwPYRAhqRAKCpZ4TJnrh61/GNUlzCAVAMmy5XTgCfXTLZ G/vhxWsc+gd8clnx5PtWcMs= =XTM8 -----END PGP SIGNATURE-----
participants (5)
-
Charles Philip Chan
-
James Ogley
-
Mike FABIAN
-
PL O'Smith
-
Richard Bos