Skip to content

Use glyph metrics to calculate text run bounds and offsets. #514

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

Merged
merged 1 commit into from
Nov 3, 2016

Conversation

glennw
Copy link
Member

@glennw glennw commented Nov 2, 2016

Instead of rasterizing glyphs, and using that to calculate the
bounding box of text runs, use glyph metrics instead.

This is important, since it allows us to delay rasterization of
glyphs until later in the frame, which means we can delay the
decision on whether to rasterize a glyph with subpixel
antialising or not.

It also removes the concept of "user data" in the texture cache
since the resource cache is now used to extract glyph metrics.


This change is Reviewable

Instead of rasterizing glyphs, and using that to calculate the
bounding box of text runs, use glyph metrics instead.

This is important, since it allows us to delay rasterization of
glyphs until later in the frame, which means we can delay the
decision on whether to rasterize a glyph with subpixel
antialising or not.

It also removes the concept of "user data" in the texture cache
since the resource cache is now used to extract glyph metrics.
@glennw
Copy link
Member Author

glennw commented Nov 2, 2016

r? @pcwalton

Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glennw
Copy link
Member Author

glennw commented Nov 2, 2016

@bors-servo r=pcwalton,kvark

@bors-servo
Copy link
Contributor

📌 Commit 4b81528 has been approved by pcwalton,kvark

@bors-servo
Copy link
Contributor

⌛ Testing commit 4b81528 with merge 72770bf...

bors-servo pushed a commit that referenced this pull request Nov 2, 2016
Use glyph metrics to calculate text run bounds and offsets.

Instead of rasterizing glyphs, and using that to calculate the
bounding box of text runs, use glyph metrics instead.

This is important, since it allows us to delay rasterization of
glyphs until later in the frame, which means we can delay the
decision on whether to rasterize a glyph with subpixel
antialising or not.

It also removes the concept of "user data" in the texture cache
since the resource cache is now used to extract glyph metrics.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/514)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit 4b81528 into servo:master Nov 3, 2016
@glennw glennw deleted the glyph-dims branch November 3, 2016 00:00
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

Successfully merging this pull request may close these issues.

4 participants