[web] Adds Noto Serif Tibetan fallback font. (flutter/engine#52971)

This PR adds the "Noto Serif Tibetan" fallback font to Flutter Web, so it can render Dzongkha, and other languages in Tibetan script.

(In order to add this fallback font, an automated script is run which updates the versions and glyphs of other fallback fonts at the same time)

(Bundle uploaded to CIPD)

## Issues

* Fixes https://github.com/flutter/flutter/issues/148797

## Testing

* Added unit test for font resolution with sample text
* Manually, in localhost, using the sample Dzongkha test from the Noto site:

<img width="959" alt="Screenshot 2024-05-21 at 2 01 19 PM" src="https://github.com/flutter/engine/assets/1255594/3f2db34d-c004-4b90-9fda-62a9cff817f9">

```
དེ་ཡང་ འཛམ་གླིང་ནང་གི་ཞི་བདེ་དང་དྲང་ཁྲིམས། དེ་ལས་དལ་དབང་ཚུ་གི་གཞི་འགྱམ་གཙོ་བོ་དེ་
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
David Iglesias
2024-05-21 15:22:26 -07:00
committed by GitHub
parent 1ac1f8c5e3
commit 63260fb965
4 changed files with 1323 additions and 1247 deletions

2
DEPS
View File

@@ -1029,7 +1029,7 @@ deps = {
'packages': [
{
'package': 'flutter/flutter_font_fallbacks',
'version': '14d38cffa1a2c9d4380094957aa63aee811b613b0dc53fd909557f61f6a9068c'
'version': '6126aab94a469ad17de6c170885b8dee8e8283cfd2383c4c77cf54c702374981'
}
],
'dep_type': 'cipd',

View File

@@ -473,6 +473,7 @@ const List<String> fallbackFonts = <String>[
'Noto Sans Warang Citi',
'Noto Sans Yi',
'Noto Sans Zanabazar Square',
'Noto Serif Tibetan',
];
bool _checkForLicenseAttribution(Uint8List fontBytes) {

View File

@@ -247,6 +247,13 @@ void testMain() {
]);
});
// https://github.com/flutter/flutter/issues/148797
test('can find Tibetan script glyphs (Dzongkha)', () async {
await checkDownloadedFamiliesForString('འཛམ་གླིང་སྤྱི་ཚོགས', <String>[
'Noto Serif Tibetan',
]);
});
test('findMinimumFontsForCodePoints for all supported code points',
() async {
// Collect all supported code points from all fallback fonts in the Noto
@@ -418,6 +425,7 @@ void testMain() {
'Noto Sans Warang Citi',
'Noto Sans Yi',
'Noto Sans Zanabazar Square',
'Noto Serif Tibetan',
}));
// Construct random paragraphs out of supported code points.