Skip to content

Commit

Permalink
Port CJK browser test to render test [#3006, #3162] (#3166)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
bdon committed Oct 6, 2023
1 parent 08fb4eb commit e3c9b41
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: install CJK fonts for local ideographs render tests
run: sudo apt install fonts-noto-cjk
- run: npm ci
- name: Start display server
if: runner.os == 'Linux'
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions test/integration/render/tests/text-local-ideographs/cjk/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"version": 8,
"metadata": {
"test": {
"localIdeographFontFamily": "sans-serif",
"width": 800,
"height": 600
}
},
"zoom": 8,
"sources": {
"sample": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"name_en": "abcde",
"name_ja": "あいうえお",
"name_ch": "阿衣乌唉哦",
"name_kr": "아이우"
}
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "sample-text-left",
"type": "symbol",
"source": "sample",
"layout": {
"text-anchor": "top",
"text-field": "{name_ja}{name_en}",
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
"text-offset": [-10, 0]
}
},
{
"id": "sample-text-center",
"type": "symbol",
"source": "sample",
"layout": {
"text-anchor": "top",
"text-field": "{name_ch}{name_kr}",
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
"text-offset": [0, 0]
}
},
{
"id": "sample-text-right",
"type": "symbol",
"source": "sample",
"layout": {
"text-anchor": "top",
"text-field": "{name_en}{name_ja}",
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
"text-offset": [10, 0]
}
}
]
}

0 comments on commit e3c9b41

Please sign in to comment.