LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-05-2007, 02:10 PM   #1
cheeby
LQ Newbie
 
Registered: Apr 2006
Distribution: gentoo and *buntu
Posts: 5

Rep: Reputation: 0
installing fonts for webserver -- not running Xorg


Hi,

How do I install a new font on server that doesn't run a gui?

I've acquired some third-party fonts and need them available for generating dynamic graphics.

I copied them to

Code:
/usr/share/fonts/corefonts
and run

Code:
# fc-cache -fv
but to no avail.

Xorg is not installed on this system, which is running gentoo.

Thanks,

Steve
 
Old 12-05-2007, 03:04 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Going to need more info, what are you trying to do?
http://albatross.dnsdojo.net/apache2...HP_GD_Graphics
 
Old 12-06-2007, 07:33 AM   #3
cheeby
LQ Newbie
 
Registered: Apr 2006
Distribution: gentoo and *buntu
Posts: 5

Original Poster
Rep: Reputation: 0
Hello,

Using imagemagick by way of PHP to create dynamic graphics on the web with some adobe fonts that are not included in the standard distro's font collection: Zapfino, Optima and MyriadPro-Light.


I've actually managed to get the app to work by referencing the font path directly:


Code:
$> convert -font 'fonts/Zapfino.dfont' -pointsize 25 -draw "text 30, 125 'Hello World!'" ....
But doing it this way doesn't, as far as I've read, allow you access to all of a font's faces, only the first one it finds. So, in the case of Optima, it grabs Bold, which is not what I want at all.

You can look at

http://www.whitepineprints.com/websi...ail.php?gid=39

(if this link doesn't resolve, omit the 'website' reference)


Pick a font from the list, enter some text and hit preview to see what I mean.


The funny thing about this is that referencing the font path directly works on this webserver but doesn't work on my development system. So, I'd like to get the font installed properly so as to reference it by name and be certain that it will appear as expected.

Most search results for how to do this assume one to be running Xorg and all you have to do is open up kcontrol (or whatever) and browse to the font files. This does work, but obviously on a server on which X isn't running this method does not apply.

Thanks,

cheeby

Last edited by cheeby; 12-06-2007 at 07:35 AM. Reason: submitting my alias, not my name
 
Old 12-06-2007, 01:35 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
So I assume ImageMagick is using the fontconfig library? If so, have you tried running fc-cache?
 
Old 12-07-2007, 10:41 AM   #5
cheeby
LQ Newbie
 
Registered: Apr 2006
Distribution: gentoo and *buntu
Posts: 5

Original Poster
Rep: Reputation: 0
I'm not sure if it's using the fontconfig library or not. This is not my server. How can I check for that?

I mentioned in my initial posting that I did run fc-cache.

Thanks,

Cheeby
 
Old 12-07-2007, 04:36 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by cheeby View Post
I'm not sure if it's using the fontconfig library or not. This is not my server. How can I check for that?

I mentioned in my initial posting that I did run fc-cache.
Oops, I guess that shows you my reading skills. Had I actually read your post, I would have seen that you can seem to get the font to load, but you can’t control things like style, weight, etc. In order to do that you should do a few things:
  1. Create a types.xml file holding these attributes.
  2. Make sure ImageMagick can find the file (either place it in ~/.magick or set the environment variable MAGICK_FONT_PATH accordingly).
  3. Reference entries in the types.xml using the specific switches (such as -font, -family, -style, -weight, etc.).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a Webserver zaheer Linux - Networking 5 02-19-2007 12:41 PM
running my own webserver ab44045 Linux - Networking 1 11-14-2005 01:47 AM
Red Hat 9.0 Webserver not displaying Asian fonts AHjuncti Linux - Software 2 09-19-2005 03:34 PM
Xorg and fonts (I think) cs-cam Linux - Newbie 1 12-04-2004 07:29 PM
Xorg and fonts goudi Mandriva 4 06-07-2004 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration