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

Custom elements #146

Closed
FredrikNoren opened this issue Jan 17, 2022 · 2 comments
Closed

Custom elements #146

FredrikNoren opened this issue Jan 17, 2022 · 2 comments

Comments

@FredrikNoren
Copy link

Hi,

Amazing library first of all!

I have one question though; is it possible to incorporate custom elements into a text flow with this? Say for instance I wanted an inline image or custom element in a Section? (I don't need glyph-brush to render these things for me, just to make space in the text-layout and tell me where they should fit)

@alexheretic
Copy link
Owner

Hello, the default layout logic cannot handle this. It only supports glyphs with metrics from (potentially multiple) fonts positioned in a quad.

A custom GlyphPositioner could be used to allow such functionality while allowing glyph_brush to continue caching the positions and rendering. However, this wouldn't be trivial to implement.

@FredrikNoren
Copy link
Author

@alexheretic Alright, thanks!

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

No branches or pull requests

2 participants