Add HarfBuzz Text Shaping and Font Fallback Support (#3611)

Co-authored-by: alan wei chen <alanchenboy@gmail.com>
This commit is contained in:
Stefan Karschti
2025-07-29 23:00:27 +03:00
committed by GitHub
parent 60264349c1
commit 09d395d0db
82 changed files with 27006 additions and 151 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@@ -0,0 +1,69 @@
{
"version": 8,
"metadata": {
"test": {
"width": 512,
"height": 512,
"allowed": 0.0003
}
},
"center": [
-70.752954126,
43.39004898677380
],
"zoom": 11,
"sources": {
"geojson": {
"type": "geojson",
"data": "local://data/burmese.geojson"
}
},
"sprite": "local://sprites/sprite",
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"font-faces": {
"Noto Sans Regular": [
{
"url": "local://glyphs/Noto%20Sans%20Regular/khmer.ttf",
"unicode-range": [
"U+1780-17FF"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/myanmar.ttf",
"unicode-range": [
"U+1000-109F",
"U+A9E0-0xA9FF",
"U+AA60-0xAA7F"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/devanagari.ttf",
"unicode-range": [
"U+0900-097F",
"U+A8E0-0xA8FF"
]
}
]
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon",
"type": "symbol",
"source": "geojson",
"layout": {
"text-field": "{name}",
"text-font": [
"Noto Sans Regular"
],
"symbol-placement": "point"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,69 @@
{
"version": 8,
"metadata": {
"test": {
"width": 512,
"height": 512,
"allowed": 0.0003
}
},
"center": [
-70.752954126,
43.39004898677380
],
"zoom": 11,
"sources": {
"geojson": {
"type": "geojson",
"data": "local://data/devanagari.geojson"
}
},
"sprite": "local://sprites/sprite",
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"font-faces": {
"Noto Sans Regular": [
{
"url": "local://glyphs/Noto%20Sans%20Regular/khmer.ttf",
"unicode-range": [
"U+1780-17FF"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/myanmar.ttf",
"unicode-range": [
"U+1000-109F",
"U+A9E0-0xA9FF",
"U+AA60-0xAA7F"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/devanagari.ttf",
"unicode-range": [
"U+0900-097F",
"U+A8E0-0xA8FF"
]
}
]
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon",
"type": "symbol",
"source": "geojson",
"layout": {
"text-field": "{name}",
"text-font": [
"Noto Sans Regular"
],
"symbol-placement": "point"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@@ -0,0 +1,69 @@
{
"version": 8,
"metadata": {
"test": {
"width": 512,
"height": 512,
"allowed": 0.0003
}
},
"center": [
-70.752954126,
43.39004898677380
],
"zoom": 11,
"sources": {
"geojson": {
"type": "geojson",
"data": "local://data/khmer.geojson"
}
},
"sprite": "local://sprites/sprite",
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"font-faces": {
"Noto Sans Regular": [
{
"url": "local://glyphs/Noto%20Sans%20Regular/khmer.ttf",
"unicode-range": [
"U+1780-17FF"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/myanmar.ttf",
"unicode-range": [
"U+1000-109F",
"U+A9E0-0xA9FF",
"U+AA60-0xAA7F"
]
},
{
"url": "local://glyphs/Noto%20Sans%20Regular/devanagari.ttf",
"unicode-range": [
"U+0900-097F",
"U+A8E0-0xA8FF"
]
}
]
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "icon",
"type": "symbol",
"source": "geojson",
"layout": {
"text-field": "{name}",
"text-font": [
"Noto Sans Regular"
],
"symbol-placement": "point"
}
}
]
}