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

Wishlish issue #1

Closed
mooman219 opened this issue Aug 2, 2019 · 7 comments
Closed

Wishlish issue #1

mooman219 opened this issue Aug 2, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@mooman219
Copy link
Owner

Post api demands here

@mooman219 mooman219 added the enhancement New feature or request label Aug 2, 2019
@AldaronLau
Copy link

I'm interested in using this project when it gets to a usable state. But, I think it would make sense to separate the font parser and the rasterizer, since they're really two separate projects. Either have the rasterizer as a feature or a separate crate that depends on the font parser. That way people who want to use a different vector graphics rasterizer can. For my projects I use footile to render 2D graphics, and I don't want to try and integrate another 2D vector graphics renderer. That's why I made fonterator, because I didn't want to integrate my footile rendering code with RustType rendering code (also because their renderer was slow).

@weswigham
Copy link
Collaborator

weswigham commented Sep 12, 2019

I wanna make sure the API for the rasterizer is forward compatible with color information embedded in fonts, as for emoji (which is OpenType, I know).

@mooman219
Copy link
Owner Author

  • Setting to control the output bitmap format
  • Setting to control mesh quality
  • Maybe something to make WASM easier

@mooman219
Copy link
Owner Author

  • Webassembly simd is a real thing apparently, so look into that.

@john01dav
Copy link

I just tried out the new layout engine, and it works great, but there is a small issue with the API. It makes it hard to relate position in an input string as an array-of-characters-type index to position on the screen in pixels. Some sort of matching could be done based on the order of the output vector, but it looks like the order just happens to match and that this isn't an API guarantee, and, more importantly, this ignores whitespace characters. If, for example, you want to put a cursor in the text (as if writing a text view control), then it is important to know where each character is, including whitespace,

@mooman219
Copy link
Owner Author

mooman219 commented Aug 19, 2020

I think it would make sense to separate the font parser and the rasterizer, since they're really two separate projects.

The parser is special for the rasterizer. It does significantly more sanitation than other rust parser right now and would be a work for no benefit. I'll make it a new bug.

Webassembly simd is a real thing apparently, so look into that.

Will add nightly support other SIMD apis that aren't stable.

I just tried out the new layout engine, and it works great, but there is a small issue with the API. It makes it hard to relate position in an input string as an array-of-characters-type....

Order is guaranteed to be in the order the string was given. I'll add an option for including whitespace.

@mooman219
Copy link
Owner Author

@john01dav Last commit adds whitespace output optionally via layout settings. Order in the output buffer is guaranteed to be in the order the string was given. Characters from the input string can only be omitted from the output, never reordered.

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

No branches or pull requests

4 participants