mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Don't load Roboto by default (flutter/engine#12205)
Fixes https://github.com/flutter/flutter/issues/39260
This commit is contained in:
parent
e30c4f2d43
commit
bcad5fd2d7
@ -41,11 +41,6 @@ class SkiaFontCollection {
|
||||
'There was a problem trying to load FontManifest.json');
|
||||
}
|
||||
|
||||
// Add Roboto to the bundled fonts since it is provided by default by
|
||||
// Flutter.
|
||||
_fontLoadingFutures
|
||||
.add(_registerFont('Roboto', _robotoFontUrl, <String, String>{}));
|
||||
|
||||
for (Map<String, dynamic> fontFamily in fontManifest) {
|
||||
final String family = fontFamily['family'];
|
||||
final List<dynamic> fontAssets = fontFamily['fonts'];
|
||||
|
||||
@ -6,8 +6,6 @@ part of engine;
|
||||
|
||||
const String _testFontFamily = 'Ahem';
|
||||
const String _testFontUrl = 'packages/ui/assets/ahem.ttf';
|
||||
const String _robotoFontUrl =
|
||||
'packages/flutter_web_ui/assets/Roboto-Regular.ttf';
|
||||
|
||||
/// This class is responsible for registering and loading fonts.
|
||||
///
|
||||
@ -54,13 +52,6 @@ class FontCollection {
|
||||
_assetFontManager = _PolyfillFontManager();
|
||||
}
|
||||
|
||||
// If not on Chrome, add Roboto to the bundled fonts since it is provided
|
||||
// by default by Flutter.
|
||||
if (browserEngine != BrowserEngine.blink) {
|
||||
_assetFontManager
|
||||
.registerAsset('Roboto', 'url($_robotoFontUrl)', <String, String>{});
|
||||
}
|
||||
|
||||
for (Map<String, dynamic> fontFamily in fontManifest) {
|
||||
final String family = fontFamily['family'];
|
||||
final List<dynamic> fontAssets = fontFamily['fonts'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user