source: josm/trunk/test/data/renderer/node-text/style.mapcss@ 15456

Last change on this file since 15456 was 11697, checked in by michael2402, 8 years ago

MapCSSRendererTest: Require fixed font for text drawing test.

File size: 2.1 KB
Line 
1canvas {
2 default-points: false;
3 default-lines: false;
4}
5
6node[test] {
7 symbol-shape: circle;
8 symbol-size: 5;
9 symbol-fill-color: #8888ff;
10 text-color: red;
11 font-family: DejaVu Sans;
12 _match: regexp_match("n(.+)", tag("test"));
13 text: eval(concat("Test ", get(prop("_match"),1)));
14}
15
16/* Anchor position */
17node[test=n1] {
18 text-anchor-horizontal: center;
19 text-anchor-vertical: center;
20}
21
22node[test=n2] {
23 text-anchor-horizontal: left;
24 text-anchor-vertical: center;
25 text-color: green;
26}
27
28node[test=n3] {
29 text-anchor-horizontal: right;
30 text-anchor-vertical: center;
31 text-color: rgba(0.1, 1.0, 0.1, 0.5);
32}
33
34node[test=n4] {
35 text-anchor-horizontal: center;
36 text-anchor-vertical: top;
37 text-color: rgba(0.1, 1.0, 0.1, 1.0);
38 text-opacity: 0.5;
39}
40
41node[test=n5] {
42 text-anchor-horizontal: center;
43 text-anchor-vertical: bottom;
44 text-color: rgba(0.1, 1.0, 0.1, 0.8);
45 text-opacity: 0.8;
46}
47
48node[test=n6] {
49 text-anchor-horizontal: center;
50 text-anchor-vertical: above;
51}
52
53node[test=n7] {
54 text-anchor-horizontal: center;
55 text-anchor-vertical: below;
56}
57
58node[test=n8] {
59 text-anchor-horizontal: center;
60 text-anchor-vertical: below;
61 text-offset-x: -10;
62 text-offset-y: -10;
63}
64
65node[test=n9] {
66 text-anchor-horizontal: left;
67 text-anchor-vertical: top;
68 text-offset-x: 5;
69 text-offset: 10; /* interpreted as offset-y */
70}
71
72node[test=n10] {
73 text-offset: list(2, -6);
74}
75
76/* Halo */
77
78node[test=n11] {
79 text-halo-radius: 1;
80 text-halo-color: green;
81}
82
83node[test=n12] {
84 text-halo-radius: 5;
85 text-halo-opacity: 0.5;
86}
87
88node[test=n13] {
89 text-halo-radius: 5;
90 text-halo-color: rgba(0, 0, 1.0, 0.4);
91}
92
93node[test=n14] {
94 text-halo-radius: 5;
95 text-halo-color: rgba(0, 0, 1.0, 0.4);
96 text-halo-opacity: 0.5;
97}
98
99node[test=n15] {
100 /* ignored */
101 text-halo-radius: -2;
102}
103
104/* Text style */
105
106node[test=n16] {
107 font-size: 10;
108 font-style: italic;
109}
110
111node[test=n17] {
112 font-size: 5;
113 text-color: green;
114}
115
116node[test=n18] {
117 font-size: 12;
118 font-weight: bold;
119}
120
121/* 19, 20: hover/disabled */
122
123/* Text values */
124node[test=n21] {
125 text: test;
126}
127
128node[test=n22] {
129 text: unused_key;
130}
131
132node[test=n23] {
133 text: auto;
134}
135
136node[test=n24] {
137 text: auto;
138}
139
140node[test=n25] {
141 text: auto;
142}
Note: See TracBrowser for help on using the repository browser.