-
Notifications
You must be signed in to change notification settings - Fork 77
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
Text extents says y size is 0 #633
Comments
Sorry here is a full yet more minimal test case: https://github.com/jgarvin/txtbug In making it I discovered it depends on using my specific font. If you get rid of the break statement in main you will actually get to see it render though, and it definitely renders with nonzero y size. |
With the examples font, the y sizes still seem wrong, just not zero:
These are all rendered from the same font object, and I'm using draw rather than draw_wrapping, so I'd expect their y extents to always be the same, or maybe differ a little because of letters that drop below the horizontal line like 'p', but it says the first string is 1/8th the height of the second string which seems too dramatic. Also assuming the unit is pixels, the rendering is clearly more than 1 pixel high :) |
This seems like the same issue as #607; I hope that I will be able to replicate this one! |
Describe the bug
layout_glyphs sometimes returns a Vector with y value 0. I'm not sure why. The demo below renders random fragments of lorem ipsum, trying to move all the older fragments up each time to make room for the new fragment at the bottom. The dbg!() macro logs the extents returned by layout_glyphs. Notice I do
old_chunk.position.y -= chunk.size.y + 50.0;
instead ofold_chunk.position.y -= chunk.size.y;
because otherwise the zero y size causes the text to bunch up.This doesn't seem to be a web issue, happens with regular Linux too. I see it either giving y=7 or y=0, not sure how it decides:
To Reproduce
EDIT: don't use this, see repo link in my next comment
Environment and versions (please complete the following information):
Environment: Ubuntu 19.10, Chrome Version 81.0.4044.138 (Official Build) (64-bit)
Rust compiler version: rustc 1.44.0 (49cae5576 2020-06-01)
Quicksilver verison: quicksilver = "0.4.0-alpha0.5"
The text was updated successfully, but these errors were encountered: