-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Pixel-perfect positioning of hardmask & softmask atlas #65
Comments
I'm curious to know why the plane bound construct exists. I looked at this thread: I notice your suggested solution is to simply add planeBound (*size) to the atlasBound for each glyph to get quad placement. If I understand this math correctly, doesn't this mean calculation could be done for every single glyph once to reduce it to a single atlasBound rectangle?? The fact that there are two separate structures makes me wonder if there is a case where they would need to be handled independently at runtime. ??? |
Where did I suggest to add plane bounds to atlas bounds? Plane bounds = world coordinates, atlas bounds = texture coordinates. |
I'm an idiot. I totally misread the code from the other thread, which colored my question poorly. Ok now I see. The planeBounds is used to offset the quad in worldspace. I was previously only thinking about locating atlas position of the glyph. Thank you! |
A fix for this issue is now available in the branch |
Merged in ae441c9, the default setting is to pixel-align baseline only (vertical alignment) for all modes. |
In
hardmask
andsoftmask
atlas-type
s, there are no special considerations to ensure that the glyph quads can be placed exactly onto the pixel grid. Instead, the plane bounds dictate that each glyph can be shifted by a different fractional pixel amount. This should be resolved.The text was updated successfully, but these errors were encountered: