Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rendering CJK glyphs top-to-bottom #3402

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions debug/chinese.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
var map = window.map = new mapboxgl.Map({
container: 'map',
zoom: 12.5,
center: [-70.751953125, 43.38904828677382],
style: 'mapbox://styles/mapbox/streets-v9',
center: [121.4885,31.2257],
style: '/debug/streets-chinese-test.json',
hash: true
});

Expand Down
193 changes: 173 additions & 20 deletions debug/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
<script>
var map = window.map = new mapboxgl.Map({
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
style: 'mapbox://styles/mapbox/streets-v9',
hash: true
});
Expand All @@ -67,32 +65,187 @@
map.addControl(new mapboxgl.ScaleControl());

map.on('load', function() {
map.addSource('geojson', {
map.addSource('lines', {
"type": "geojson",
"data": "/node_modules/mapbox-gl-test-suite/data/linestring.geojson"
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "one"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.4195556640625,
39.091699613104595
],
[
102.3046875,
39.36827914916014
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "two"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.403076171875,
39.10022600175347
],
[
103.35937499999999,
65.80277639340238
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "three"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.414062499999998,
39.091699613104595
],
[
-14.765625,
82.21421714106776
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "four"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.408569335937498,
39.091699613104595
],
[
-130.78125,
39.095962936305476
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "five"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.414062499999998,
39.095962936305476
],
[
-16.5234375,
-58.81374171570779
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "six"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.4195556640625,
39.10022600175347
],
[
-130.4296875,
64.47279382008166
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "seven"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.4195556640625,
39.0831721934762
],
[
33.75,
81.87364125482827
]
]
}
},
{
"type": "Feature",
"properties": {
"name": "eight"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-14.447021484374998,
39.104488809440475
],
[
-66.4453125,
82.26169873683153
]
]
}
}
]
}
});

map.addLayer({
"id": "route",
"id": "lines",
"type": "line",
"source": "geojson",
"source": "lines",
"paint": {
"line-color": "#EC8D8D",
"line-width": {
"base": 1.5,
"stops": [
[
5,
0.75
],
[
18,
32
]
]
}
"line-width": 5
}
});

map.addLayer({
"id": "lines-symbol",
"type": "symbol",
"source": "lines",
"layout": {
"text-field": "{name}",
"symbol-placement": "line",
"symbol-spacing": 10
}
}, 'country-label-lg');
});

var bufferTimes = {};
map.on('tile.stats', function(bufferTimes) {
Expand Down
Loading