Hi Michaela
I am not aware of any way of applying different text styles to different
parts of a single text symbolizer.
One thing you could try is split the labels into two separate text
symbolizers, and apply an offset equal to the font height to the second one.
So something like this:
<Rule>
<TextSymbolizer>
<Label>
<ogc:PropertyName>IDENT</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-fill">black</CssParameter>
<CssParameter name="font-weight">normal</CssParameter>
</Font>
</TextSymbolizer>
</Rule>
<Rule>
<TextSymbolizer>
<Label>
<ogc:PropertyName>LOWERLIMIT</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-fill">black</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<Displacement>
<DisplacementX>0</DisplacementX>
<DisplacementY>14</DisplacementY>
</Displacement>
</PointPlacement>
</LabelPlacement> </TextSymbolizer>
</Rule>
I'm not too familiar with geocss, so I'm not quite sure how this would
translate, but perhaps something like this:
* {
label: [IDENT];
font-weight: normal;
font-fill: black;
}
* {
label: [LOWERLIMIT];
font-weight: bold;
font-fill: black;
label-offset: 0 14;
}
Torben
On Wed, Sep 20, 2017 at 7:03 AM, Egger Michaela <
[email protected]> wrote:
> Hello,
>
>
>
> I would like to split the style of my labels, which consist of 2
> attributes. I already managed to separate the lines, but I need to style
> them differently as well, as the second line should be bold. Unfortunately
> I'm running out of ideas, how it could work.
>
>
>
> Currently my label looks like this:
>
>
>
> IDENT
>
> LOWERLIMIT
>
>
>
> And I would like it to look like this:
>
>
>
> IDENT (small)
>
> *LOWERLIMIT* (bold)
>
>
>
> I would prefer to do it in CSS, but I also prepared the style in SLD, so I
> would be happy for a solution in either of them.
>
>
>
> My code looks like this in CSS:
>
>
>
> * {
>
> label: [IDENT][LOWERLIMIT];
>
> -gt-label-auto-wrap: 1;
>
> font-weight: normal;
>
> font-fill: black;
>
> }
>
>
>
> and like this in SLD:
>
>
>
> <Rule>
>
> <TextSymbolizer>
>
> <Label>
>
> <ogc:PropertyName>IDENT</ogc:PropertyName><![CDATA[
>
> ]]>
>
> <ogc:PropertyName>LOWERLIMIT</ogc:PropertyName>
>
> </Label>
>
> <Font>
>
> <CssParameter name="font-fill">black</CssParameter>
>
> <CssParameter name="font-weight">normal</CssParameter>
>
> </Font>
>
> </TextSymbolizer>
>
> </Rule>
>
>
>
>
>
> Thanks for any help!
>
>
>
> Michaela
> Wichtiger Hinweis: Diese E-Mail Nachricht kann Betriebs- oder
> Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten.
> Wenn Sie nicht der Adressat sind und diese Nachricht irrtümlich erhalten
> haben, ist Ihnen eine Verwendung des Inhalts, eine Vervielfältigung oder
> Weitergabe dieser Nachricht ausdrücklich untersagt. Bitte benachrichtigen
> Sie uns und vernichten Sie die empfangene Nachricht. Vielen Dank. Please
> Note: This e-mail message may contain trade secrets or privileged,
> undisclosed or otherwise confidential information. If you are not the
> intended recipient and have received this message in error or by mistake
> any unauthorized use, reproduction or distribution of this message is
> strictly prohibited. Please notify us immediately and destroy the original
> transmittal. Thank you for your cooperation. Austro Control Österreichische
> Gesellschaft für Zivilluftfahrt mit beschränkter Haftung Sitz/Registered
> address: Wien/ Vienna; Registriert unter/registered under: FN 71000m
> Competent court/Firmenbuchgericht: HG Wien/commercial court Vienna;
> Rechtsform/legal form: GmbH Postanschrift/postal address: Wagramer Straße
> 19 - 1220 Wien/Vienna DVR: 0447277
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/
> userlist-guidelines.html
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users