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 · 5 comments
Open

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

kokosky93 opened this issue Sep 27, 2024 · 5 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

@FrancoTanzarellaEviivo
Copy link

I'm having the same problem although I don't know if it is a bug or me not understanding how to use skia properly. Here is a snack to reproduce. This happens on both Android and iOS. On my project I'm using v1.7.6 but this is also reproduced on my snack with v1.5.0 and expo

https://snack.expo.dev/1Os73WHi4LNPz3EnFNlB9?platform=ios

@FrancoTanzarellaEviivo
Copy link

I'm having the same problem although I don't know if it is a bug or me not understanding how to use skia properly. Here is a snack to reproduce. This happens on both Android and iOS. On my project I'm using v1.7.6 but this is also reproduced on my snack with v1.5.0 and expo

https://snack.expo.dev/1Os73WHi4LNPz3EnFNlB9?platform=ios

Fixe my issue by grouping. Please ignore my question.

@dentemm
Copy link

dentemm commented Jan 6, 2025

I've had the same issue, I've seen it on both platforms but it seems to occur more often on Android. I'll see if I can create a minimal repro in the coming days

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

5 participants