Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some emoji with modifer scalar render error #129

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

xiaoxiaowesley
Copy link

What steps will reproduce the problem?
In flutter. Skia will render errors in rendering emojis which more than one Scalar. Like 1️⃣ (U+0031 U+FE0F U+20E3)

flutter related issues:
flutter/flutter#108720
flutter/flutter#49627
flutter/flutter#100964

What is the expected output? What do you see instead?
Render emoji nomarly.

What version of the product are you using? On what operating system?
I don't have more iPhone devices. I got two iPhones.
One is iPhone 6, iOS 12.4.8, and it renders OK.
Another is iPhone 12 Pro, iOS 16.2. and it renders an error.

Please submit a code sample via fiddle.skia.org showing the issue.

Flutter demo:

import 'package:flutter/material.dart';

void main() {
  runApp(const TextApp());
  // runApp(const RandomPositionTextApp());
}

class TextApp extends StatelessWidget {
  const TextApp({super.key});

  @override
  Widget build(BuildContext context) {
    TextStyle myCustomFontStyle = const TextStyle(
      fontFamily: 'NotoColorEmoji-Regular',
    );
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[

              Text(
                '1️⃣',
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I tracked this bug. When using iPhone 6, iOS 12.4.8. It will fallback font 'Apple Color Emoji' And in iPhone 12 Pro, iOS 16.2 will fallback font '.LastResort' which will render '??' finally.

And I tried to fix this bug which the chromium project has similar issues:https://chromium.googlesource.com/chromium/src.git/+/7846480579c09efa317a65beb58c195a6a5bb352

@skia-codereview-bot
Copy link
Collaborator

This PR (HEAD: b276f5f) has been imported to Gerrit for code review.

Please visit review.skia.org/658816 to see it. Please CC yourself to the Gerrit change.

Note:

  • Skia uses only Gerrit for reviews and submitting code (doc).
  • All comments are handled within Gerrit. Any comments on the GitHub PR will be ignored.
  • The PR author can continue to upload commits to the branch used by the PR in order to address feedback from Gerrit.
  • Once the code is ready to be merged, a maintainer will submit the change on Gerrit and skia-codereview-bot will close this PR.
  • Similarly, if a change is abandoned on Gerrit, the corresponding PR will be closed with a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants