Hi Rohit I used truetype fonts. I had a bunch from a Windows installation that I copied over. I copied a set of truetype fonts that I had into the /usr/X11R6/lib/X11/fonts directory, then I ran: ttmkfdir | sed s/^[0-9]*// > fonts.scale.myfonts /sbin/conf.d/SuSEconfig.fonts xset fp rehash which created the encoding files. (I noticed that sometimes the fonts start to look screwed up again and SuSEconfig has replaced the first line of fonts.scale with a 0. Edit and change back to whatever is the first line of fonts.dir). However, there may be an easier way, which is: In the control panel you can install fonts using the System->Font Installer section. Select the folder that you have the fonts in for the left hand pane, and it will get installed in to the directory in the right hand pane. If you have an LCD screen, use sub-pixel hinting. I think thats all I did. But in the flurry of setting things up, I may have missed something, apologies if so. cheers jalal Rohit wrote:
# The main criticism I would have is that the fonts look terrible until # things have been tweaked.
Hi Jalal,
I took your work from SLE list where you said the above lines. I did my first 8.0 install and I was worried to death as to why my fonts were so screwed up on the dual boot machine where everything seemed fantastic in Windows! Now I am a bit reassured - and that I do not have to go change my monitor.
It is true that the fonts look perfectly screwed up. What do you suggest I should do to get some decent fonts in X11/KDE.
Please let me know. Thanks a lot. If you gave concise, specific hints, I should be able to pick up from there.
Thanks and regards, Rohit
jalal
Hi Rohit
I used truetype fonts. I had a bunch from a Windows installation that I copied over.
I copied a set of truetype fonts that I had into the /usr/X11R6/lib/X11/fonts directory, then I ran:
ttmkfdir | sed s/^[0-9]*// > fonts.scale.myfonts /sbin/conf.d/SuSEconfig.fonts xset fp rehash
which created the encoding files. (I noticed that sometimes the fonts start to look screwed up again and SuSEconfig has replaced the first line of fonts.scale with a 0. Edit and change back to whatever is the first line of fonts.dir).
That doesn't matter. You don't need to change this from 0 to the actual number. fonts.scale is not read neither by the X-server nor by the font server. Only fonts.dir is used. fonts.scale is only used by mkfontdir when it creates fonts.dir. See the man page of mkfontdir: man mkfontdir> Because scalable font files do not usually include the X font name, man mkfontdir> the file "fonts.scale" can be used to name the scalable fonts in the man mkfontdir> directory. The fonts listed in it are copied to fonts.dir by man mkfontdir> mkfontdir. "fonts.scale" has the same format as the "fonts.dir" file. It happens that mkfontdir ignores the number in the first line of fonts.scale. You can put any arbitrary number there and mkfontdir happily appends the contents of fonts.scale to fonts.dir and generates the correct number in the first line of fonts.dir.
However, there may be an easier way, which is: In the control panel you can install fonts using the System->Font Installer section. Select the folder that you have the fonts in for the left hand pane, and it will get installed in to the directory in the right hand pane.
If you have an LCD screen, use sub-pixel hinting.
I think thats all I did. But in the flurry of setting things up, I may have missed something, apologies if so.
cheers jalal
Rohit wrote:
# The main criticism I would have is that the fonts look terrible until # things have been tweaked. Hi Jalal, I took your work from SLE list where you said the above lines. I did my first 8.0 install and I was worried to death as to why my fonts were so screwed up on the dual boot machine where everything seemed fantastic in Windows! Now I am a bit reassured - and that I do not have to go change my monitor. It is true that the fonts look perfectly screwed up. What do you suggest I should do to get some decent fonts in X11/KDE. Please let me know. Thanks a lot. If you gave concise, specific hints, I should be able to pick up from there. Thanks and regards, Rohit
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
--
Mike Fabian
I've tried this and a lot of other things on my machine (7.3, XF4.2) to get my TTF working again, but no avail. Following the first part of the instructions below gets me a fonts.scale file that is around 26K in size, listing all the fonts in the truetype directory. That's fine. However, fonts.dir is still set to 2 bytes, only containing a "0". Not sure why this is. I run /sbin/init.d/SuSEconfig.fonts and that doesn't output any errors (should it?). When I go to run "xset fp rehash" as my user I get the following output: xset fp rehash X Error of failed request: 86 Major opcode of failed request: 51 (X_SetFontPath) Serial number of failed request: 8 Current serial number in output stream: 10 What does this actually mean? What's setup wrong in my X config? Any pointers are appreciated. The files were first installed via K Font Installer (KDE 3.0.3 btw), but then I uninstalled them and copied them over manually as well. Let me know if you need more info. Thanks. - Greg On Thu, 2002-09-12 at 13:29, Mike Fabian wrote:
jalal
writes: Hi Rohit
I used truetype fonts. I had a bunch from a Windows installation that I copied over.
I copied a set of truetype fonts that I had into the /usr/X11R6/lib/X11/fonts directory, then I ran:
ttmkfdir | sed s/^[0-9]*// > fonts.scale.myfonts /sbin/conf.d/SuSEconfig.fonts xset fp rehash
which created the encoding files. (I noticed that sometimes the fonts start to look screwed up again and SuSEconfig has replaced the first line of fonts.scale with a 0. Edit and change back to whatever is the first line of fonts.dir).
That doesn't matter. You don't need to change this from 0 to the actual number. fonts.scale is not read neither by the X-server nor by the font server. Only fonts.dir is used.
fonts.scale is only used by mkfontdir when it creates fonts.dir. See the man page of mkfontdir:
man mkfontdir> Because scalable font files do not usually include the X font name, man mkfontdir> the file "fonts.scale" can be used to name the scalable fonts in the man mkfontdir> directory. The fonts listed in it are copied to fonts.dir by man mkfontdir> mkfontdir. "fonts.scale" has the same format as the "fonts.dir" file.
It happens that mkfontdir ignores the number in the first line of fonts.scale. You can put any arbitrary number there and mkfontdir happily appends the contents of fonts.scale to fonts.dir and generates the correct number in the first line of fonts.dir.
However, there may be an easier way, which is: In the control panel you can install fonts using the System->Font Installer section. Select the folder that you have the fonts in for the left hand pane, and it will get installed in to the directory in the right hand pane.
If you have an LCD screen, use sub-pixel hinting.
I think thats all I did. But in the flurry of setting things up, I may have missed something, apologies if so.
cheers jalal
Rohit wrote:
# The main criticism I would have is that the fonts look terrible until # things have been tweaked. Hi Jalal, I took your work from SLE list where you said the above lines. I did my first 8.0 install and I was worried to death as to why my fonts were so screwed up on the dual boot machine where everything seemed fantastic in Windows! Now I am a bit reassured - and that I do not have to go change my monitor. It is true that the fonts look perfectly screwed up. What do you suggest I should do to get some decent fonts in X11/KDE. Please let me know. Thanks a lot. If you gave concise, specific hints, I should be able to pick up from there. Thanks and regards, Rohit
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-- Mike Fabian
http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Thu. Sep. 19, 2002 at 23:19:54 -0500 GMT, a lone cry was heard from
Greg Macek
I've tried this and a lot of other things on my machine (7.3, XF4.2) to get my TTF working again, but no avail. Following the first part of the instructions below gets me a fonts.scale file that is around 26K in size, listing all the fonts in the truetype directory. That's fine. However, fonts.dir is still set to 2 bytes, only containing a "0".
(1) Go to the directory of your truetype fonts. (2) Run: ttmkfdir -o fonts.dir (3) Make sure that you have loaded the freetype module in the "Module" section of your /etc/X11/XF86Config, ie: load "freetype" (4) Make sure that the path of your truetype fonts is in the "Files" section. (5) If the truetype module was loaded before, run: xset fp rehash If the truetype module was not load before hand, restart X. These instructions only apply if you are not using a font server. Charles -- "Are [Linux users] lemmings collectively jumping off of the cliff of reliable, well-engineered commercial software?" (By Matt Welsh)
This worked great! Haven't had a chance to restart X yet (didn't need to), but thanks for the tip! Any info as to why an X Font server would be wreaking havoc with this? I always thought it was necessary to display TTF, even with XF 4.x. Perhaps I've misunderstood this whole time. - Greg On Fri, 2002-09-20 at 00:18, Charles Philip Chan wrote:
On Thu. Sep. 19, 2002 at 23:19:54 -0500 GMT, a lone cry was heard from Greg Macek
in the wasteland called the Internet: I've tried this and a lot of other things on my machine (7.3, XF4.2) to get my TTF working again, but no avail. Following the first part of the instructions below gets me a fonts.scale file that is around 26K in size, listing all the fonts in the truetype directory. That's fine. However, fonts.dir is still set to 2 bytes, only containing a "0".
(1) Go to the directory of your truetype fonts.
(2) Run:
ttmkfdir -o fonts.dir
(3) Make sure that you have loaded the freetype module in the "Module" section of your /etc/X11/XF86Config, ie:
load "freetype"
(4) Make sure that the path of your truetype fonts is in the "Files" section.
(5) If the truetype module was loaded before, run:
xset fp rehash
If the truetype module was not load before hand, restart X.
These instructions only apply if you are not using a font server.
Charles
-- "Are [Linux users] lemmings collectively jumping off of the cliff of reliable, well-engineered commercial software?" (By Matt Welsh)
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Fri. Sep. 20, 2002 at 00:45:08 -0500 GMT, a lone cry was heard from
Greg Macek
thanks for the tip!
Glad to be of help.
Any info as to why an X Font server would be wreaking havoc with this?
You can use a font server too, but the setup will be different. For example, the path of your truetype font will be located in the config file of the font server.
I always thought it was necessary to display TTF, even with XF 4.x.
No, 4.x have native truetype font support. Charlex -- LILO, you've got me on my knees! (from David Black, dblack@pilot.njin.net, with apologies to Derek and the Dominos, and Werner Almsberger)
Charles Philip Chan
On Thu. Sep. 19, 2002 at 23:19:54 -0500 GMT, a lone cry was heard from Greg Macek
in the wasteland called the Internet: I've tried this and a lot of other things on my machine (7.3, XF4.2) to get my TTF working again, but no avail. Following the first part of the instructions below gets me a fonts.scale file that is around 26K in size, listing all the fonts in the truetype directory. That's fine. However, fonts.dir is still set to 2 bytes, only containing a "0".
(1) Go to the directory of your truetype fonts.
(2) Run:
ttmkfdir -o fonts.dir
This will be overwritten during the next run of SuSEconfig. Better use ttmkfdir -o fonts.scale.myfonts Then run SuSEconfig. That's not perfect either for various reasons: - duplicate lines from fonts.scale.myfonts and other fonts.scale.* files will all end up in fonts.dir - ttmkfdir's output is sometimes not very good, it may omit encodings which are useful, sometimes it adds encodings which don't work well, sometimes it makes entries for fonts as charcell fonts '-c-' which don't work well as charcell fonts. There are many other problems with ttmkfdir ... You can try mkfontscale instead of ttmkfdir. mkfontscale works better, but even mkfontscale can't do the job perfectly. Probably it is impossible to do the job perfectly automatically. The author of mkfontscale wrote me:
Mapping TrueType and Type 1 font tables to XLFDs is intrinsically an underspecified task.
Therefore we use the current mechanism of generating fonts.scale
out of handedited fonts.scale.something files. These files
were originally created with mkfontscale, but then improved
manually and packaged with the font rpm.
If you add you own fonts, you need to do the same for best results.
Create a fonts.scale.myfonts first with ttmkfdir or mkfontscale.
Then improve it manually if necessary.
I'll try to make the automatic mechanisms work a little bit better in
the future, but that is unfortunately not so easy.
--
Mike Fabian
On Fri. Sep. 20, 2002 at 10:55:25 +0200 GMT, a lone cry was heard from
Mike Fabian
This will be overwritten during the next run of SuSEconfig.
You are right about that. I totally forgot about that because I tend to edit config files directly these day instead of using YaST+SuSEconfig.
- duplicate lines from fonts.scale.myfonts and other fonts.scale.* files will all end up in fonts.dir
It would be nice if the SuSE font system can filter out the dups before writing the fonts.dir file.
You can try mkfontscale instead of ttmkfdir. mkfontscale works better,
Interesting, never tried that program. Thanks for the info.
I'll try to make the automatic mechanisms work a little bit better in the future, but that is unfortunately not so easy.
I look forward to it. Charles -- "...Deep Hack Mode--that mysterious and frightening state of consciousness where Mortal Users fear to tread." (By Matt Welsh)
Charles Philip Chan
- duplicate lines from fonts.scale.myfonts and other fonts.scale.* files will all end up in fonts.dir
It would be nice if the SuSE font system can filter out the dups before writing the fonts.dir file.
Yes, I'll do that. I just couldn't find time to improve
/sbin/conf.d/SuSEconfig.fonts before the Release of 8.1, but I hope
that i can improve it until SuSE Linux 8.2.
--
Mike Fabian
Greg Macek
I've tried this and a lot of other things on my machine (7.3, XF4.2) to get my TTF working again, but no avail. Following the first part of the instructions below gets me a fonts.scale file that is around 26K in size, listing all the fonts in the truetype directory. That's fine. However, fonts.dir is still set to 2 bytes, only containing a "0". Not sure why this is. I run /sbin/init.d/SuSEconfig.fonts and that doesn't output any errors (should it?).
/sbin/conf.d/SuSEconfig.fonts didn't update fonts.dir. Example root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# echo 0 > fonts.dir root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# /sbin/conf.d/SuSEconfig.fonts Updating fonts.scale for truetype Updating fonts.scale for Type1 Updating fonts.scale for Speedo Updating fonts.scale for CID root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# cat fonts.dir 0 nothing happened. /sbin/conf.d/SuSEconfig.fonts checks the timestamp of /usr/X11R6/lib/X11/fonts/truetype and compares it with the timestamp of /var/adm/SuSEconfig/lastrun.SuSEconfig.fonts to find out whether it needs to update fonts.dir. But the timestamp of the /usr/X11R6/lib/X11/fonts/truetype didn't change after I did 'echo 0 > fonts.dir', therefore SuSEconfig.fonts didn't do any work. It's possible to force it by removing fonts.dir: root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# rm fonts.dir root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# /sbin/conf.d/SuSEconfig.fonts Updating fonts.scale for truetype Updating fonts.scale for Type1 Updating fonts.scale for Speedo Updating fonts.scale for CID Updating X11 font directory truetype... create XftCache files ... Now we saw the message "Updating X11 font directory truetype..." and now fonts.dir has the same contents as fonts.scale: root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# head -n 5 fonts.dir 694 luximr.ttf -b&h-Luxi Mono-medium-r-normal--0-0-0-0-m-0-iso8859-1 luximr.ttf -b&h-Luxi Mono-medium-r-normal--0-0-0-0-m-0-iso8859-2 luximr.ttf -b&h-Luxi Mono-medium-r-normal--0-0-0-0-m-0-iso8859-3 luximr.ttf -b&h-Luxi Mono-medium-r-normal--0-0-0-0-m-0-iso8859-4 root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# You can achieve the same effect by touching /usr/X11R6/lib/X11/fonts/truetype: root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# touch /usr/X11R6/lib/X11/fonts/truetype root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# /sbin/conf.d/SuSEconfig.fonts Updating fonts.scale for truetype Updating fonts.scale for Type1 Updating fonts.scale for Speedo Updating fonts.scale for CID Updating X11 font directory truetype... create XftCache files ... root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# Or, if you want to recreate all fonts.dir files in all directories, remove the global time stamp: root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# rm /var/adm/SuSEconfig/lastrun.SuSEconfig.fonts root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# /sbin/conf.d/SuSEconfig.fonts Updating fonts.scale for truetype Updating fonts.scale for Type1 Updating fonts.scale for Speedo Updating fonts.scale for CID Updating X11 font directory 75dpi... Updating X11 font directory CID... Updating X11 font directory Speedo... Updating X11 font directory TTF... Updating X11 font directory Type1... Updating X11 font directory baekmuk... Updating X11 font directory encodings... Updating X11 font directory encodings/large... Updating X11 font directory japanese... Updating X11 font directory local... Updating X11 font directory misc... Updating X11 font directory truetype... Updating X11 font directory ucs... Updating X11 font directory ucs/misc... Updating X11 font directory uni... Updating X11 font directory util... create XftCache files ... root@nozomi:/usr/X11R6/lib/X11/fonts/truetype#
When I go to run "xset fp rehash" as my user I get the following output:
xset fp rehash X Error of failed request: 86 Major opcode of failed request: 51 (X_SetFontPath) Serial number of failed request: 8 Current serial number in output stream: 10
What does this actually mean?
Broken fonts.dir or fonts.dir refers to fonts which don't exist
or fonts listed in fonts.dir are broken themselves. For example:
root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# xset fp rehash
OK, no error (This root user has access to the display because I
became root using the 'sux' script). Now write nonsense to fonts.dir:
root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# echo nonsense > fonts.dir
And we get this error message:
root@nozomi:/usr/X11R6/lib/X11/fonts/truetype# xset fp rehash
X Error of failed request: 86
Major opcode of failed request: 51 (X_SetFontPath)
Serial number of failed request: 8
Current serial number in output stream: 10
root@nozomi:/usr/X11R6/lib/X11/fonts/truetype#
--
Mike Fabian
participants (4)
-
Charles Philip Chan
-
Greg Macek
-
jalal
-
Mike Fabian