Style (.sld) syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Style (.sld) syntax

dblasby
I change the fonts all the time.  Here's an example part of an SLD.  You
can also point the font-family directly to a .ttf file.

Here's the actual specifying the font (you can use "Ariel" if you want
ariel instead of Time New Roman):
 <Font>
        <CssParameter name="font-family">Times New Roman</CssParameter>
        <CssParameter name="font-style">Normal</CssParameter>
        <CssParameter name="font-size">14</CssParameter>
        <CssParameter name="font-weight">bold</CssParameter>
 </Font>

Here's the full symbolizer:

<TextSymbolizer>
    <Label>
        <ogc:PropertyName>NAME</ogc:PropertyName>
    </Label>

    <Font>
        <CssParameter name="font-family">Times New Roman</CssParameter>
        <CssParameter name="font-style">Normal</CssParameter>
        <CssParameter name="font-size">14</CssParameter>
        <CssParameter name="font-weight">bold</CssParameter>
    </Font>

    <Halo>

            <Radius>
                 <ogc:Literal>2</ogc:Literal>
            </Radius>
            <Fill>
                <CssParameter name="fill">#FFFFFF</CssParameter>
                <CssParameter name="fill-opacity">0.85</CssParameter>
            </Fill>

    </Halo>

    <Fill>
        <CssParameter name="fill">#000000</CssParameter>
    </Fill>
</TextSymbolizer>

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

RE: Style (.sld) syntax

Roland Shield
Dave,

It is unlikely that you can use "Ariel" at all as "Ariel" is not a standard
font-family. "Arial", with an 'a', not an 'e' is, in fact, a recognized
font-family, of the sans-serif style.

Perhaps my question appears arbitrary, but it is not. As a follow-up
question, can you answer this: When the .sld (style .xmlish document)
specifies a font-family parameter, where does GeoServer "go" to get that
specific font-family file? Is it loaded into the GeoServer code itself? Does
it fetch it from the server upon which the instance of GeoServer resides?

Also, does there exist ANY documentation regarding the font-families
specifically supported by GeoServer.
Furtermore, if it is able to support *any* fonts, is there documentation for
the process of readying GeoServer to support something like
"vendoer-supplied" or "vector-based" fonts?


Roland Shield, GIS guy, x268
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, August 03, 2005 10:01 AM
To: [hidden email]
Cc: [hidden email]
Subject: [Geoserver-users] Style (.sld) syntax

I change the fonts all the time.  Here's an example part of an SLD.  You can
also point the font-family directly to a .ttf file.

Here's the actual specifying the font (you can use "Ariel" if you want ariel
instead of Time New Roman):
 <Font>
        <CssParameter name="font-family">Times New Roman</CssParameter>
        <CssParameter name="font-style">Normal</CssParameter>
        <CssParameter name="font-size">14</CssParameter>
        <CssParameter name="font-weight">bold</CssParameter>
 </Font>

Here's the full symbolizer:

<TextSymbolizer>
    <Label>
        <ogc:PropertyName>NAME</ogc:PropertyName>
    </Label>

    <Font>
        <CssParameter name="font-family">Times New Roman</CssParameter>
        <CssParameter name="font-style">Normal</CssParameter>
        <CssParameter name="font-size">14</CssParameter>
        <CssParameter name="font-weight">bold</CssParameter>
    </Font>

    <Halo>

            <Radius>
                 <ogc:Literal>2</ogc:Literal>
            </Radius>
            <Fill>
                <CssParameter name="fill">#FFFFFF</CssParameter>
                <CssParameter name="fill-opacity">0.85</CssParameter>
            </Fill>

    </Halo>

    <Fill>
        <CssParameter name="fill">#000000</CssParameter>
    </Fill>
</TextSymbolizer>

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

RE: Style (.sld) syntax

dblasby
In reply to this post by dblasby
Sorry - I meant "Arial".

As I said, you can either use a path ("c:\...\font.ttf") to a specific
font in the"font-family" or the name of the font.

I'm not sure of the exact discovery mechanism for fonts, but Java should
just be getting them from the underlying operating system.

dave


----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users