-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: qualityA truly polished experienceA truly polished experiencec: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Use case
When using CanvasKit and trying to display emojis, issue #76248 arises, i.e. "Emojis take a few seconds to render on canvaskit".
This means that when first displaying emojis, tofu boxes appear for a few seconds.
Proposal
It would be great to have an exposed function that allows loading the Noto font on app start, so that when the first emojis are displayed, the Noto font is already preloaded.
Workaround
The way we solve this currently is the following:
@override
Widget build(BuildContext build) {
return Stack(
children: [
// w/e
const Opacity(
opacity: 0,
// Insert invisible emoji in order to load the emoji font in CanvasKit
// on startup. Note that this is a *workaround solution* - we want to
// find a better one :)
child: Text('✨'),
),
],
);
}This is inserted on startup. As soon as we actually display emojis, the Noto font has already been downloaded. However, this really feels like a hack.
iapicca, wilsonowilson, braj065, cmedamine, Maatteogekko and 9 moreFintasys and victor-tinoco
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: qualityA truly polished experienceA truly polished experiencec: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team