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

Start implementing text in layout 2020 #24822

Merged
merged 6 commits into from Nov 25, 2019

Introduce GlyphStore::total_advance

  • Loading branch information
nox committed Nov 25, 2019
commit a5e55ddb201c2a4d314bf333a126d8595138c91c
@@ -452,6 +452,11 @@ impl<'a> GlyphStore {
}
}

#[inline]
pub fn total_advance(&self) -> Au {
This conversation was marked as resolved by SimonSapin

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Nov 22, 2019

Member

What does 2013 do to not need this?

This comment has been minimized.

Copy link
@nox

nox Nov 25, 2019

Author Member

2013 does not use GlyphStore directly at all, it uses gfx::text::text_run::TextRun and gfx::text::text_run::GlyphRun, but that uses even more thread-local caches, so I opted out of that stuff.

self.total_advance
}

#[inline]
pub fn len(&self) -> ByteIndex {
ByteIndex(self.entry_buffer.len() as isize)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.