[Geoserver-users] Custom rexr Symbolizer - Font

Hi,

I would like to add a custom font and I tried this method :
Download a .ttf file (in that case GemFont One.ttf) that I put in
data/styles folder in GeoServer.
Then I Clear Resource Cache under Server Status.
In my sld file I have :
<sld:Label>
           <ogc:PropertyName>ADMIN_NAME</ogc:PropertyName>
         </sld:Label>
         <sld:Font>
           <sld:CssParameter name="font-size">20</sld:CssParameter>
           <sld:CssParameter name="font-style">GemFont
One</sld:CssParameter>
         </sld:Font>
...

The problem is that the font doesn't change, I don't have my custom style
but the default style.
What's wrong ?

Thanks a lot for your help !

Pascal.
         
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-rexr-Symbolizer-Font-tp5088485.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Mon, Nov 11, 2013 at 10:35 AM, pascal <pascal2833@anonymised.com> wrote:

Hi,

I would like to add a custom font and I tried this method :
Download a .ttf file (in that case GemFont One.ttf) that I put in
data/styles folder in GeoServer.
Then I Clear Resource Cache under Server Status.
In my sld file I have :
<sld:Label>
           <ogc:PropertyName>ADMIN_NAME</ogc:PropertyName>
         </sld:Label>
         <sld:Font>
           <sld:CssParameter name="font-size">20</sld:CssParameter>
           <sld:CssParameter name="font-style">GemFont
One</sld:CssParameter>
         </sld:Font>
...

The problem is that the font doesn't change, I don't have my custom style
but the default style.
What's wrong ?

Custom fonts are picked up on startup, or whenever you press the "reload"
button
in the status page, so if you added the font after GeoServer started, you'll
have to force a reload.

Moreover, normally the name of the fond is equal to the file name.
If you go in the status page there is a link to all the available fonts,
see how it's
called there

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Thanks for your answer,

But now I have an other problem :
I choose in the list an existing font (URW Chancery L Medium Italic) and I
try to applied it in the sld file like that but it doesn't work, I have the
default style and not the new one:
<sld:TextSymbolizer>
         <sld:Label>
           <ogc:PropertyName>ADMIN_NAME</ogc:PropertyName>
         </sld:Label>
         <sld:Font>
           <sld:CssParameter name="font-size">20</sld:CssParameter>
           <sld:CssParameter name="font-style">URW Chancery L Medium
Italic</sld:CssParameter>
         </sld:Font>
         <sld:Fill>
          <sld:CssParameter name="fill">#543545</sld:CssParameter>
         </sld:Fill>
       </sld:TextSymbolizer>

So my question is : is it the good way to introduce a new font style or the
parameters that I have introduced (font-size, font-style) are not the good
one ?

Thanks a lot,

Pascal.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-rexr-Symbolizer-Font-tp5088485p5088511.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sorry, it works. I suppose that I've done something wrong !

Pascal.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-rexr-Symbolizer-Font-tp5088485p5088542.html
Sent from the GeoServer - User mailing list archive at Nabble.com.