This is a discussion on Installing TTF fonts within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Ok, i've tried searching, but I can't find anything recent enough to actually be useful (as in the commands ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Ok, i've tried searching, but I can't find anything recent enough to actually be useful (as in the commands I'm told to use don't exist anymore in 10.2, like ttmkfdir). So is there any useful resource on how to install TTF fonts in slackware (or even linux in general)? |
| |||
| MaskedSlacker wrote: > Ok, i've tried searching, but I can't find anything recent enough > to actually be useful (as in the commands I'm told to use don't > exist anymore in 10.2, like ttmkfdir). > > So is there any useful resource on how to install TTF fonts in > slackware (or even linux in general)? See http://brendan.sdf-eu.org/articles/a...sing_slack.php - the first part of this article shoul be of help to you. Note that Slack 10.2 has the TTF fonts in /usr/X11R6/lib/X11/fonts/TTF - so amend the font path accordingly. |
| |||
| MaskedSlacker wrote: > Ok, i've tried searching, but I can't find anything recent enough to > actually be useful (as in the commands I'm told to use don't exist > anymore in 10.2, like ttmkfdir). > > So is there any useful resource on how to install TTF fonts in slackware > (or even linux in general)? You could try this, go to http://corefonts.sourceforge.net/ then 1- go to "just the fonts" 2- click "here" 3- download cabextract-06-1.i386.rpm and all the .exe files 4- if you use slackware then first do: rpm2tgz cabextract-0.6-1.i386.rpm 5-as root using pkgtool you can install cabextract now 6-from the location where you have the downloaded .exe files do the following: cabextract -L -d /usr/X11R6/lib/X11/fonts/truetype * maybe you want another location, -do not forget the * You could also take alook here: http://dejavu.sourceforge.net/wiki/index.php/Main_Page |
| |||
| MaskedSlacker wrote: > Ok, i've tried searching, but I can't find anything recent enough to > actually be useful (as in the commands I'm told to use don't exist > anymore in 10.2, like ttmkfdir). > > So is there any useful resource on how to install TTF fonts in > slackware (or even linux in general)? Assuming you have a bunch of TTF font files (from wherever you got them), it's pretty easy: log in as root (or su or whatever) cd directory-where-TTF-files-are # create the target directory if it doesn't already exist mkdir -p /usr/X11R6/lib/X11/fonts/TTF # copy all the TTF files, changing the name to lower case as you go for file in *.[Tt][Tt][Ff] do cp ${file} /usr/X11R6/lib/X11/fonts/TTF/`echo ${file} | tr [A-Z] [a-z]` done # go to the directory you just copied all that stuff to cd /usr/X11R6/lib/X11/fonts/TTF # if you got them from winders, change the mode of the files chmod 644 * # create the fonts.dir and fonts.scale files you need mkfontdir mkfontscale # you should have files fonts.dir and fonts.scale, look at 'em if you want Now you need to add the font path to /etc/X11/xorg.conf; in the section "Files," add this line: FontPath "/usr/X11R6/lib/X11/fonts/TTF/" That section of my xorg.conf file looks like this: Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" ModulePath "/usr/X11R6/lib/modules" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/TTF/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/myfonts/" # FontPath "/usr/X11R6/lib/X11/fonts/CID/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" EndSection You need to exit from X (if it's running) and execute fc-cache /usr/X11R6/lib/X11/fonts/TTF That's it. |
| |||
| Thomas Ronayne wrote: > MaskedSlacker wrote: > >> Ok, i've tried searching, but I can't find anything recent enough to >> actually be useful (as in the commands I'm told to use don't exist >> anymore in 10.2, like ttmkfdir). >> >> So is there any useful resource on how to install TTF fonts in >> slackware (or even linux in general)? > > > Assuming you have a bunch of TTF font files (from wherever you got > them), it's pretty easy: > > log in as root (or su or whatever) > cd directory-where-TTF-files-are > # create the target directory if it doesn't already exist > mkdir -p /usr/X11R6/lib/X11/fonts/TTF > # copy all the TTF files, changing the name to lower case as you go > for file in *.[Tt][Tt][Ff] > do > cp ${file} /usr/X11R6/lib/X11/fonts/TTF/`echo ${file} | tr [A-Z] > [a-z]` > done > # go to the directory you just copied all that stuff to > cd /usr/X11R6/lib/X11/fonts/TTF > # if you got them from winders, change the mode of the files > chmod 644 * > # create the fonts.dir and fonts.scale files you need > mkfontdir > mkfontscale > # you should have files fonts.dir and fonts.scale, look at 'em if > you want > > Now you need to add the font path to /etc/X11/xorg.conf; in the section > "Files," add this line: > > FontPath "/usr/X11R6/lib/X11/fonts/TTF/" > > That section of my xorg.conf file looks like this: > > Section "Files" > RgbPath "/usr/X11R6/lib/X11/rgb" > ModulePath "/usr/X11R6/lib/modules" > FontPath "/usr/X11R6/lib/X11/fonts/misc/" > FontPath "/usr/X11R6/lib/X11/fonts/TTF/" > FontPath "/usr/X11R6/lib/X11/fonts/Type1/" > FontPath "/usr/X11R6/lib/X11/fonts/myfonts/" > # FontPath "/usr/X11R6/lib/X11/fonts/CID/" > FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" > FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" > EndSection > > You need to exit from X (if it's running) and execute > > fc-cache /usr/X11R6/lib/X11/fonts/TTF > > That's it. You have also to add the new directory in /etc/fonts/fonts.conf in order that the fonts are visible to program using the freetype library Olive |
| |||
| Olive wrote: > You have also to add the new directory in /etc/fonts/fonts.conf in order > that the fonts are visible to program using the freetype library cool, now i finally know why my gtk2 programs couldn't see my ttf fonts. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9 |
| |||
| > Section "Files" > RgbPath "/usr/X11R6/lib/X11/rgb" > ModulePath "/usr/X11R6/lib/modules" > FontPath "/usr/X11R6/lib/X11/fonts/misc/" > FontPath "/usr/X11R6/lib/X11/fonts/TTF/" > FontPath "/usr/X11R6/lib/X11/fonts/Type1/" > FontPath "/usr/X11R6/lib/X11/fonts/myfonts/" > # FontPath "/usr/X11R6/lib/X11/fonts/CID/" > FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" > FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" > EndSection You can add this in the beginning of /etc/fonts/fonts.conf (or in local.conf if it works, it will no be overriden at the next update of xorg) <dir>/usr/X11R6/lib/X11/fonts/TTF</dir> <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>~/.fonts</dir> Then, > fc-cache > That's it. Now, ok -- Mounir AITTAHAR |
| |||
| Olive wrote: > You have also to add the new directory in /etc/fonts/fonts.conf in > order that the fonts are visible to program using the freetype library > > Olive You know, I've never had to do that -- I add the fonts (TTF, Adobe, PostScript) whenever I do an install then run xorgsetup and it seems to find all of them and does its thing (or maybe not) but everything I use (Firefox, Mozilla, OpenOffice and other things) seem to find the TTF files without a problem. So I'll add that to /etc/fonts/fonts.conf and see what happens. Hmm, learn something every day. |
| ||||
| MaskedSlacker wrote: > Ok, i've tried searching, but I can't find anything recent enough to > actually be useful (as in the commands I'm told to use don't exist > anymore in 10.2, like ttmkfdir). > > So is there any useful resource on how to install TTF fonts in slackware > (or even linux in general)? Hell is paved with good intentions, a french saying goes. Which means that many people will guide you to some hairpulling-type experience by answering you. Let's avoid this: # mkdir /usr/share/fonts Copy all your .ttf files into that directory, and then: # fc-cache -f -v Your TTF fonts are ready to use, and you don't even need to restart your x server (nor, God forbid, reboot Cheers, Niki Kovacs -- I'm not as think as you stoned I am. |