A simple way to install new ttf fonts on linux

Recently, I faced with a typical office problem. I was made to create diplomas layout for my school. Although, I’m not an artistic person, I agreed to do that task.

One thing that I needed was a sophisticated font. More creative than standard “Times New Roman”. So I visited one of that sites with free fonts and found a suitable one. It looks similar to handwriting.

My troubles started when I tried to install it. According to documentation, adding new fonts to X.org is a bit complicated. I could do that, but luckily I didn’t have much time so I look up for a simpler solution. Shortly I discovered in my gentoo OS a folder .fonts. It is located in user’s home directory. I copied there .ttf files and everything ran out of box. For me it’s a nice solution for that problem.

Discussion Join the discussion (0 comments)

Installing printer HP Deskjet 710C in cups

I recently heard that many people have problems with setting up printing in linux. In fact the popular linux printing daemon – cups is often problematic. However, as long as you can read logs, think and use google, every problem with it is solvable. Here is my story:

(I assume that you have already installed cups)
First of all look at site about printing in linux. Find out what driver your printer use and download .ppd file for it. If your printer use no-postscipt driver install that driver. In my case (HP 710C) I have to install foomatic (emerge foomatic). I also copy .ppd file to /usr/share/cups/model/. I need to modify config file (/etc/cups/cupsd.conf). I replace line Listen “*:localhost:631″ with “Listen localhost:631″. Than I run cups daemon (/etc/init.d/cupsd start) and type in web browser localhost:631 and simply add printer. After that steps printing works.

Useful logs are located in: /var/log/cups/
CUPS is sometimes difficult to configure, mostly because it gives strange errors messages. Despite it require some basic knowledge, installing a printer shouldn’t be a problem for advanced user.

Discussion Join the discussion (0 comments)

Flash no fonts problem – SOLVED

After last re-installation of gentoo I noticed that in some Adobe Flash programs fonts doesn’t render. It was especially visible in Google Analytics. I check if I have all necessary fonts (like corefonts from Microsoft), but that wasn’t a problem.
At first googling didn’t give any interesting results. I tried to see where flash plugin search for fonts so I run opera, determine it pid and attach strace. Surprisingly, it didn’t search for fonts at all. So, as I quess, it must be X‘s tasks. I googled for a while and found that I need to add FontPath into xorg.conf. After restarting X‘s everything work correctly.

Detail description of using strace:

  1. Launch opera
  2. “ps -aux | grep opera”, to see opera pid
  3. “strace -fp 12345 &> opera_log”, log sys calls
  4. Go to that flash, where no text was displayed
  5. Kill strace (CTRL+C is enough)
  6. “less opera_log”, look for open or read in folders /usr/share/fonts/*

Solution:

  1. “emerge –noreplace corefonts”
  2. edit “/etc/X11/xorg.conf”, in section “Files” add: FontPath “/usr/share/fonts/corefonts”
  3. save and restart X‘s (CTRL+ALT+BACKSPACE)
Discussion Join the discussion (0 comments)

Installing kydpdict

Installing 3rd part software that isn’t in official repository/tree in linux distributions is often problematic. Here is the guide how to install dictionary frontend – Kydpdict in gentoo:

  1. Log as root (su)
  2. Create directory /usr/local/overlays/mysiar (*or other in /usr/local)
  3. Download http://www.synowiec.org/mysiar-portage.sh (wget http://www.synowiec.org/mysiar-portage.sh)
  4. Give it right to run and run it (chmod o+x mysiar-portage.sh && ./mysiar-portage.sh)
  5. Add line PORTDIR_OVERLAY=”/usr/local/overlays/mysiar” to /etc/make.conf
  6. Sync portage tree (emerge –sync)
  7. Try emerge kydpdict
  8. If it fail saying that Manifest point file that doesn’t exist, remove that entry from Manifest and try to emerge again
  9. Copy dictionary files from your windows version and rename them to lowercast characters

I hope that this guide was helpful.

UPDATE:
Added step 5. (2006-09-16)

Discussion Join the discussion (0 comments)