Skip to content

[Web canvaskit] Does not render Thai Text on Edge browser #101738

@SittiphanSittisak

Description

@SittiphanSittisak

My project must take the user to write the sign.
Like this.
image
If I use flutter build web it can't use .toImage by error like Unsupported operation: toImage is not supported on the Web
For a long time to fix this. I found a solution using flutter build web --web-renderer canvaskit. But when I used this, My language using in TextRich() did not show on the mobile web like this below.
222377
When I try to use the English language, it will work normally on the mobile web like this below.
image

basic code:

final GlobalKey keyRepaint = GlobalKey();
RepaintBoundary(
                key: keyRepaint,
                child: Stack(
                  alignment: Alignment.center,
                  children: [
                    RichText(
                        text: TextSpan(children: [
                      TextSpan(text: "ลงชื่อ"),
                      TextSpan(text: "ผู้สมัคร"),
                    ])),
                    SizedBox(width: 280, height: 70),
                  ],
                ),
              ),

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19044.1586], locale th-TH)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.66.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

How to fix this?

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)a: typographyText rendering, possibly libtxtassigned for triageissue is assigned to a domain expert for further triagebrowser: edgeonly manifests in Edge (Chromium-based)e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 2.10Found to occur in 2.10has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions