Skip to content

Commit e3c9b41

Browse files
authored
Port CJK browser test to render test [#3006, #3162] (#3166)
* Port CJK browser test to render test [#3006, #3162] * add platform-specific expected images for local ideographs render test. [#3166] * Ubuntu expected is tofu * github actions ubuntu runner: apt install CJK fonts for render tests [#3166] * Commit expected Ubuntu local ideographs image with noto fonts installed from apt [#3166]
1 parent 08fb4eb commit e3c9b41

5 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/test-all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ jobs:
100100
- uses: actions/setup-node@v3
101101
with:
102102
node-version: lts/*
103+
- name: install CJK fonts for local ideographs render tests
104+
run: sudo apt install fonts-noto-cjk
103105
- run: npm ci
104106
- name: Start display server
105107
if: runner.os == 'Linux'
8.44 KB
Loading
10.2 KB
Loading
9.92 KB
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"localIdeographFontFamily": "sans-serif",
6+
"width": 800,
7+
"height": 600
8+
}
9+
},
10+
"zoom": 8,
11+
"sources": {
12+
"sample": {
13+
"type": "geojson",
14+
"data": {
15+
"type": "Feature",
16+
"geometry": {
17+
"type": "Point",
18+
"coordinates": [0, 0]
19+
},
20+
"properties": {
21+
"name_en": "abcde",
22+
"name_ja": "あいうえお",
23+
"name_ch": "阿衣乌唉哦",
24+
"name_kr": "아이우"
25+
}
26+
}
27+
}
28+
},
29+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
30+
"layers": [
31+
{
32+
"id": "sample-text-left",
33+
"type": "symbol",
34+
"source": "sample",
35+
"layout": {
36+
"text-anchor": "top",
37+
"text-field": "{name_ja}{name_en}",
38+
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
39+
"text-offset": [-10, 0]
40+
}
41+
},
42+
{
43+
"id": "sample-text-center",
44+
"type": "symbol",
45+
"source": "sample",
46+
"layout": {
47+
"text-anchor": "top",
48+
"text-field": "{name_ch}{name_kr}",
49+
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
50+
"text-offset": [0, 0]
51+
}
52+
},
53+
{
54+
"id": "sample-text-right",
55+
"type": "symbol",
56+
"source": "sample",
57+
"layout": {
58+
"text-anchor": "top",
59+
"text-field": "{name_en}{name_ja}",
60+
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
61+
"text-offset": [10, 0]
62+
}
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)