TextSymbolizer with horizontalAlignment="adjust" and Format fails to display anything if text is short
zdila opened this issue · comments
Martin Ždila commented
Testcase:
<Map backgroundColor="white">
<Layer srs="+init=epsg:4326">
<StyleName>main</StyleName>
<Datasource>
<Parameter name="type">geojson</Parameter>
<Parameter name="inline">
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[ 12.59033203125, 50.21909462044748 ],
[ 18.127441406249996, 49.49667452747045 ]
]
}
}
]
}
</Parameter>
</Datasource>
</Layer>
<Style name="main">
<Rule>
<LineSymbolizer stroke="black" stroke-width="1" />
<TextSymbolizer
face-name="PT Sans Regular"
size="30"
horizontal-alignment="adjust"
placement="line"
line-spacing="20"
>
"Česko\n"
<Format size="20">Czechia</Format>
</TextSymbolizer>
</Rule>
</Style>
</Map>
Result:
If I replace "Česko\n"
with " Česko \n"
(or some different longer text) then text appears:
Also if I remove <Format...
then I see the text displayed.