-
-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add adjustment to rendering glyphs (#1005)
* add topAdjustment for glyph * add topAdjustment for glyph * update changelog * add issue number * add alphabet and cjk text test #1002 * fix lint error
- Loading branch information
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions
61
test/integration/render/tests/text-font/alphabet-cjk/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"version": 8, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"sources": { | ||
"sample": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [0, 0] | ||
}, | ||
"properties": { | ||
"name_en": "abc", | ||
"name_ja": "あいう", | ||
"name_ch": "阿衣乌" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "sample-text-left", | ||
"type": "symbol", | ||
"source": "sample", | ||
"layout": { | ||
"text-anchor": "top", | ||
"text-field": "{name_ja}\n{name_en}", | ||
"text-font": ["NotoCJK"], | ||
"text-offset": [-10, 0] | ||
} | ||
}, | ||
{ | ||
"id": "sample-text-center", | ||
"type": "symbol", | ||
"source": "sample", | ||
"layout": { | ||
"text-anchor": "top", | ||
"text-field": "{name_ja}{name_en}{name_ch}", | ||
"text-font": ["NotoCJK"], | ||
"text-offset": [0, 0] | ||
} | ||
}, | ||
{ | ||
"id": "sample-text-right", | ||
"type": "symbol", | ||
"source": "sample", | ||
"layout": { | ||
"text-anchor": "top", | ||
"text-field": "{name_en}\n{name_ch}", | ||
"text-font": ["NotoCJK"], | ||
"text-offset": [10, 0] | ||
} | ||
} | ||
] | ||
} |