Skip to content

Commit 4597393

Browse files
authored
Update font-faces property with releases (#1242)
1 parent 19b15a6 commit 4597393

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

src/reference/v8.json

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -223,30 +223,23 @@
223223
"value": "fontFaces",
224224
"doc": "The `font-faces` property can be used to specify what font files to use for rendering text. Font faces contain information needed to render complex texts such as [Devanagari](https://en.wikipedia.org/wiki/Devanagari), [Khmer](https://en.wikipedia.org/wiki/Khmer_script) among many others.<h2>Unicode range</h2>The optional `unicode-range` property can be used to only use a particular font file for characters within the specified unicode range(s). Its value should be an array of strings, each indicating a start and end of a unicode range, similar to the [CSS descriptor with the same name](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). This allows specifying multiple non-consecutive unicode ranges. When not specified, the default value is `U+0-10FFFF`, meaning the font file will be used for all unicode characters.\n\nRefer to the [Unicode Character Code Charts](https://www.unicode.org/charts/) to see ranges for scripts supported by Unicode. To see what unicode code-points are available in a font, use a tool like [FontDrop](https://fontdrop.info/).\n\n<h2>Font Resolution</h2>For every name in a symbol layer’s [`text-font`](./layers.md/#text-font) array, characters are matched if they are covered one of the by the font files in the corresponding entry of the `font-faces` map. Any still-unmatched characters then fall back to the [`glyphs`](./glyphs.md) URL if provided.\n\n<h2>Supported Fonts</h2>What type of fonts are supported is implementation-defined. Unsupported fonts are ignored.",
225225
"example": {
226-
"Noto Sans Regular": [
227-
{
228-
"url": "https://example.com/fonts/Noto%20Sans%20Regular/khmer.ttf",
229-
"unicode-range": [
230-
"U+1780-17FF"
231-
]
232-
},
233-
{
234-
"url": "https://example.com/fonts/Noto%20Sans%20Regular/myanmar.ttf",
235-
"unicode-range": [
236-
"U+1000-109F",
237-
"U+A9E0-A9FF",
238-
"U+AA60-AA7F"
239-
]
240-
},
241-
{
242-
"url": "https://example.com/fonts/Noto%20Sans%20Regular/devanagari.ttf",
243-
"unicode-range": [
244-
"U+0900-097F",
245-
"U+A8E0-A8FF"
246-
]
247-
}
248-
],
249-
"Open Sans": "https://example.com/fonts/Open%20Sans.ttf"
226+
"Noto Sans Regular": [{
227+
"url": "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansKhmer/hinted/ttf/NotoSansKhmer-Regular.ttf",
228+
"unicode-range": ["U+1780-17FF"]
229+
},
230+
{
231+
"url": "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansDevanagari/hinted/ttf/NotoSansDevanagari-Regular.ttf",
232+
"unicode-range": ["U+0900-097F"]
233+
},
234+
{
235+
"url": "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMyanmar/hinted/ttf/NotoSansMyanmar-Regular.ttf",
236+
"unicode-range": ["U+1000-109F"]
237+
},
238+
{
239+
"url": "https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansEthiopic/hinted/ttf/NotoSansEthiopic-Regular.ttf",
240+
"unicode-range": ["U+1200-137F"]
241+
}],
242+
"Unifont": "https://ftp.gnu.org/gnu/unifont/unifont-15.0.01/unifont-15.0.01.ttf"
250243
},
251244
"sdk-support": {
252245
"basic functionality": {

0 commit comments

Comments
 (0)