WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Type 1 fonts on X11  (Read 3129 times)

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Type 1 fonts on X11
« on: May 18, 2022, 08:05:09 AM »
Hi everyone,

I'm triyng to add some fonts into X11 because when i try to launch an ihm from my server to my rasp
Code: [Select]
ihm -d 192.168.3.16:0.0 I get an error that said can't load
 -adobe-*-bold-o-normal--14-*-*-*-m-*-iso8859-l
So with this error I am thinking that I am missiong fonts on my rasp and after getting the server's fonts file I wanted to put this fonts file in /usr/local/share/fonts and then do
Code: [Select]
fc-cache -f -vbut after Iv'e done it only the fonts files with the .ttf extension shows up in fc-list and I also have .afm file (they doesn't show up with fc-list) in my fonts but I don't know where to put this files in tiny core.

Any toughts ?
« Last Edit: May 18, 2022, 08:21:25 AM by MrToga »
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #1 on: May 18, 2022, 09:29:56 AM »
Update :

I found a repertory that use type 1 in /usr/local/lib/X11/fonts/Type1 so I put all my .afm files in it but after I do
Code: [Select]
fc-cache -f -vIt return :
Code: [Select]
/usr/local/lib/X11/fonts/Type1: skipping,looped directory detectedSo in the end he still doesn't detect my .afm files
It's fine

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Type 1 fonts on X11
« Reply #2 on: May 18, 2022, 10:27:37 AM »
That app, whatever it is, uses old X fonts, not freetype/fontconfig. So fc-cache is not what you should use.

After putting the font files in the proper dir and updating the indexes with mkfontdir/mkfontscale, restart your X server. Use "xlsfonts" to see which old-style fonts are available.

edit: The mentioned font seems to be -adobe-courier-bold-o-normal--14-140-75-75-m-90-iso885, which is usually 75dpi/courBO14-ISO8859-1.pcf.gz.
« Last Edit: May 18, 2022, 10:34:25 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #3 on: May 18, 2022, 10:32:06 AM »
Hi curaga,
Thanks for your response but my xlsfonts doesn't seem to work because when I try to launch it say's that :
-sh xlsfonts: not found
But with the command
Code: [Select]
which xlsfontsIt find it in /usr/local/bin/xlsfonts
And this file has a symlink to /tmp/tcloop/Xlibs/usr/bin/xlsfont

Also I don't know which package contain mkfontdir/mkfontscale

Thanks in advance
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #4 on: May 19, 2022, 03:57:42 AM »
Update :

After I've install xlsfonts mkfontdir mkfontscale on my rasp I try to run this command for my repertory of .afm fonts but mkfontdir does'nt recognize .afm file.

Because mkfontdir only search for .pcf .sn and .bdf file.

So now I'm stuck
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #5 on: May 19, 2022, 04:25:24 AM »
Update:

I found courBO14-ISO8859-1.pcf.gz. so I put this file in /usr/lib/X11/fonts/75dpi/ but when I try to use mkfontdir -e /usr/lib/X11/fonts/75dpi he create me the file fonts.dir but in this file there only the content of file that where not symlink. I also found out that the fonts used for my xserver are place in /usr/local/lib/X11/fonts/ in this repertory theres a symlink for 75dpi that go to /tmp/tcloop/Xlibs/usr/local/lib/X11/fonts/75dpi/ . Can I change the symlink to /usr/lib/X11/fonts/75dpi/ or can I directly put my new .pcf.gz file in /tmp/tcloop/Xlibs/usr/local/lib/X11/fonts/75dpi/ to make it persistent ?
« Last Edit: May 19, 2022, 04:31:54 AM by MrToga »
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #6 on: May 19, 2022, 05:18:38 AM »
Update :

After some research I found out that I can use xset fp+ $PWD to add a fonth path to my server but when I try it I keep getting this error :
Code: [Select]
xset:  bad font path element (#3), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax
I change all the permission et I also have fonts.dir and fonts.alias in my repertory (see attached files).
Any toughts ?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14827
Re: Type 1 fonts on X11
« Reply #7 on: May 19, 2022, 05:34:05 AM »
Have you checked where xorg-server is looking for the fonts?

In /var/log/Xorg.0.log you should see something like this:
Code: [Select]
[    18.591] (==) FontPath set to:           
        /usr/local/lib/X11/fonts/misc/,                           
        /usr/local/lib/X11/fonts/TTF/,               
        /usr/local/lib/X11/fonts/Type1/,                                       
        /usr/local/lib/X11/fonts/75dpi/ 

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #8 on: May 19, 2022, 05:43:12 AM »
Yes I just checked and I found it (I created a file in xorg.conf.d that specified the location of the fonts file) but still doesn't work and in xlsfonts I  still doesn't see my new fonts
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14827
Re: Type 1 fonts on X11
« Reply #9 on: May 19, 2022, 07:09:36 AM »
Did you restart the x server?

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #10 on: May 19, 2022, 07:39:34 AM »
yes and I still have the error
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Type 1 fonts on X11
« Reply #11 on: May 19, 2022, 08:17:08 AM »
Update :

My edit of fonts.alias was wrong it work now but is there a command that create and edit the font.alias file ?
It's fine

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11660
Re: Type 1 fonts on X11
« Reply #12 on: May 19, 2022, 08:49:38 AM »
Hi MrToga
You could add the  fonts.alias  file to your backup.

Or you could:
Code: [Select]
echo "alias /Full/Path/To/FontName" >> /Full/Path/To/fonts.aliasIf the X server is already running, you might also need to:
Code: [Select]
xset fp rehash
http://osr507doc.sco.com/en/GECG/X_Font_ProcFnAlias.html

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14827
Re: Type 1 fonts on X11
« Reply #13 on: May 22, 2022, 11:20:04 AM »
xlsfonts updated in Xlibs - it works now.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14827
Re: Type 1 fonts on X11
« Reply #14 on: May 22, 2022, 11:45:58 AM »
mkfontscale posted