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

[WIP] Paragraph API (Rich Text) #1554

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

[WIP] Paragraph API (Rich Text) #1554

wants to merge 11 commits into from

Conversation

wcandillon
Copy link
Collaborator

No description provided.

@siderakis
Copy link

I believe this work was being referred to as the "paragraph API" in some other bugs/discussions. May I suggest including the name " paragraph" in the title for discoverability. I couldn't find it by searching and only stumbled on it when browsing.

@wcandillon wcandillon changed the title [WIP] Rich Text [WIP] Paragraph API (Rich Text) Jun 28, 2023
@wcandillon
Copy link
Collaborator Author

@siderakis done. To give an update on this feature. Step 1 is to expose the Skia Font Manager in React Native: #1662
Then, while this PR is very promising there is still some small decisions we need to make in terms of the declarative API we want to expose.
From there, we will finalize the implementation in the following platform order (from easiest to hardest): web, android, and iOS.

@choudlet
Copy link

Hi! @wcandillon! Is there any testing or additional development work that needs to be taken on to get this PR moving again? I'm happy to help with this one!

@wcandillon
Copy link
Collaborator Author

wcandillon commented Sep 11, 2023

@choudlet this is a great question. version 0.1.203 beta finally ships the paragraph module with Skia. Our plan is in the short term to offer a tokenizer to use with the paragraph module. This will enable what Skia calls "Client unicode": https://github.com/google/skia/blob/main/modules/skparagraph/src/ParagraphBuilderImpl.h#L63
Based on earlier experiment, we expect this to be something we can ship relatively quickly.

From there, we would be in a state where you would be able to extend the JSI API the same way we look at it for the Animated GIF API. It's just that API is large but the complexity is low.
We believe that this would allow you to use the paragraph module within the <Canvas /> element via the <Picture /> component.

From there, we would be able to add the declarative API for the paragraph module as seen in this PR.
I hope this clarifies.

@wcandillon
Copy link
Collaborator Author

wcandillon commented Sep 25, 2023

@choudlet once #1877 is ready, you will have all the tools to implement the paragraph API "as easily" (famous last words) as you guys did it for the GIF API

@choudlet
Copy link

@wcandillon ok awesome! Yes I see all of the method stubs that you created in that PR that we would need to go ahead and implement. Happy to jump on that and help once the PR is in and stable!

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

Successfully merging this pull request may close these issues.

None yet

3 participants