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

Text / Paragraph / Image is not rendering on canvas #2656

Open
kokosky93 opened this issue Sep 27, 2024 · 2 comments
Open

Text / Paragraph / Image is not rendering on canvas #2656

kokosky93 opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kokosky93
Copy link

kokosky93 commented Sep 27, 2024

Description

Hi, sometimes a text is not rendering on canvas at the first time. In such case if I click on an element on which the text should be visible it shows up.

The same situation with images.

It has been happening for me for a long time - this is not a version issue.

I think it is happening mostly if you render something in a list.

Can you please advise?

Version

1.3.10

Steps to reproduce

Look at the code example.

Snack, code example, screenshot, or link to a repository


const customFontMgr = useFonts({
        Regular: [
            require("../../assets/fonts/PlusJakartaSans-Regular.ttf")
        ],
    });

    const dayParagraph = useMemo(() => {
        if (!customFontMgr) {
            return null;
        }

        return Skia.ParagraphBuilder.Make({ textAlign: TextAlign.Center }, customFontMgr)
            .pushStyle({
                color: Skia.Color("#FFFFFF"),
                fontFamilies: ["Regular"],
                fontSize: 15,
            })
            .addText(label)
            .build();
    }, [customFontMgr]);

<Paragraph paragraph={dayParagraph} x={0} y={14} width={width} />

@kokosky93 kokosky93 added the bug Something isn't working label Sep 27, 2024
@dumihi313
Copy link

In such case if I click on an element on which the text should be visible it shows up.
I have same bug

@wcandillon
Copy link
Contributor

Can you please share a reproducible example? As well as information which platform this happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants