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

Annotation: Support for get/set rich media attributes on text #28

Open
jamie-lemon opened this issue Mar 7, 2024 · 2 comments
Open
Labels
annotations core-api Requires an update in the MuPDF source code to enable the API

Comments

@jamie-lemon
Copy link
Collaborator

Adobe supply this kind of widget in their UI to style annotation text:

Screenshot 2024-03-07 at 17 34 10

However we are unable to read/write to these rich media objects.

@jamie-lemon jamie-lemon added the core-api Requires an update in the MuPDF source code to enable the API label Mar 18, 2024
@jamie-lemon
Copy link
Collaborator Author

@ccxvii I think the "text alignment" value that is often required is the text alignment set from this kind of rich media.

If I try getQuadding() with the current API on annotation text which has its text alignment changed this way it always returns 0.

@jamie-lemon jamie-lemon changed the title Support for get/set rich media attributes on text Annotation: Support for get/set rich media attributes on text Mar 19, 2024
@ccxvii
Copy link
Collaborator

ccxvii commented Aug 13, 2024

We support rendering rich media styled text in mupdf core, BUT ONLY IF it is built to include the HTML engine.

  1. We do not build the HTML engine for WASM, as this adds a lot of bloat to the binary.

  2. The rich style property (RS) is essentially a string of CSS property syntax, which is applied to the rich content (RC) which is a subset of HTML syntax. In theory any changes to the RS and RC should also be reflected into the basic non-rich style properties that we already support. This is not an easy task, because to do so we'd need to parse, generate, and EDIT both CSS and HTML content using the proposed functions.

Parsing we can currently do with the HTML engine, but only enough to get us rendered content. Editing the HTML and CSS is far out of scope for our HTML layout engine.

I suggest we close this as WONTFIX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations core-api Requires an update in the MuPDF source code to enable the API
Projects
None yet
Development

No branches or pull requests

2 participants