Add new tests for Khmer text.
Reference renderings: http://licadho-cambodia.org/mapnik/khmer.html Thanks to github user "nirvn" for providing these images. Refs #1208.
This commit is contained in:
parent
beed2d08f2
commit
019a44da80
2 changed files with 41 additions and 11 deletions
|
@ -17,28 +17,22 @@
|
|||
<Rule>
|
||||
<!-- This is an easy test to ensure text shaping actually works. Ligatures are rendered when harfbuzz is used, but not with the old text rendering system. -->
|
||||
<Filter>[nr] = "1"</Filter>
|
||||
<!-- <TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="16">"fi"</TextSymbolizer> -->
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"mixed نامجو mixed"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="16">"fi"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"mixed نامجو Text"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<!-- In addition to the problem mentioned in the bug report (which seems to be gone) this the position is calculated incorrectly -->
|
||||
<Filter>[nr] = "13"</Filter>
|
||||
<Filter>[nr] = "3"</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="16">"نامجو 17"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="-16">"#519"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "15"</Filter>
|
||||
<Filter>[nr] = "5"</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"زنقة الملاح"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="16">"#1154"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<!--TODO: Find suitable font! -->
|
||||
<Filter>[nr] = "17"</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="16">"អក្សរខ្មែរ"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="-16">"#1208"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "19"</Filter>
|
||||
<Filter>[nr] = "9"</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"أڭادير"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="16">"#1146"</TextSymbolizer>
|
||||
</Rule>
|
||||
|
|
36
tests/visual_tests/styles/khmer.xml
Normal file
36
tests/visual_tests/styles/khmer.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file">../data/points.shp</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
<Style name="My Style">
|
||||
<Rule>
|
||||
<PointSymbolizer/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "1"</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ព្រះរាជាណាចក្រកម្ពុជា"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "3"</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ស្ត្រី"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "5"</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ផ្លូវ ១២៣"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "7"</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="-16">"ផផ្ទះសំណាក់សណ្ឋាគារមាស"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "9"</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ផ្លូវ១២៣"</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
</Map>
|
Loading…
Reference in a new issue