Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to use a custom font I have downloaded from the web with Geoserver for my labels. How do I specify the location of my font so that the font-family css parameter can read it?

Ando

Geoserver 2.1.4

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You put your custom TTF-fonts in the catalog styles which are located in your data directory.

Then you need to Clear Resource Cache under Server Status so that the font will be loaded by the server!

This is a new functionality from 2.1.x.

share|improve this answer
    
I did the above steps no luck so far, do I just specify in my sld as <sld:Font><sld:CssParameter name="font-family">"fontName".ttf</sld:CssParameter></sld:Font>? Or is there a special way of specifying? –  Ando Jul 25 '12 at 0:21
    
Apolologies for the above comment, I had got the font name wrong. Also you do not require the .ttf extension. –  Ando Jul 25 '12 at 0:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.