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

can fontdue rasterize with fractional pixel offsets? #125

Open
wtholliday opened this issue Oct 3, 2022 · 5 comments
Open

can fontdue rasterize with fractional pixel offsets? #125

wtholliday opened this issue Oct 3, 2022 · 5 comments

Comments

@wtholliday
Copy link

I don't see anything in the API, but perhaps I'm missing it?

I don't need RGB subpixel AA (and indeed I don't think it would work well with my glyph atlas approach, especially when text is transformed), but it would be nice to rasterize with subpixel offsets.

I'm using fontdue in this library which is used in my little GUI library

@mooman219
Copy link
Owner

It's not exposed. There are internals for it, but I haven't put much thought into designing the API. We're already up to 6 rasterize functions and I feel like it's getting out of hand. It honestly might make more sense to make a breaking version change and use a builder style for the various glyph parameters (and potentially future ones), but I'm not sure.

https://github.com/mooman219/fontdue/blob/master/src/font.rs#L574

That 3rd parameter set to 0.0 is actually the horizontal offset.

@wtholliday
Copy link
Author

@mooman219 Builder sounds good. Let me know if I can help out!

@alokedesai
Copy link

Following up on this, was there any progress made on this?

I'd be happy to help submit a PR for this if we can settle on an API that folks feel good about.

@alokedesai
Copy link

@mooman219 Ping on this, would you be open to accepting a PR to add support for this?

@mooman219
Copy link
Owner

mooman219 commented Jul 30, 2023

Yeah feel free to play around with ideas and send a PR. If you want to explore what a builder might look like I'm open to that, otherwise we can take the easy way out with some more function bloat and expose the offset parameters in yet another function. Given the surface of fontdue is just a couple functions in Font, it's really not so bad.

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

3 participants