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

Rebase of #12905: Fix #12193 Servo displays upper level Thai character in wrong place. #13442

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Fix #12193 Servo displays upper level Thai character in wrong place.

  • Loading branch information
veer66 authored and pcwalton committed Sep 26, 2016
commit 51b51b28f2a73ef696b63bbc394ca30812342a13
@@ -254,10 +254,10 @@ impl<'a> DetailedGlyphStore {

let i = self.detail_lookup.binary_search(&key)
.expect("Invalid index not found in detailed glyph lookup table!");

assert!(i + (count as usize) <= self.detail_buffer.len());
let main_detail_offset = self.detail_lookup[i].detail_offset;
assert!(main_detail_offset + (count as usize) <= self.detail_buffer.len());
// return a slice into the buffer
&self.detail_buffer[i .. i + count as usize]
&self.detail_buffer[main_detail_offset .. main_detail_offset + count as usize]
}

fn detailed_glyph_with_index(&'a self,
@@ -274,9 +274,9 @@ impl<'a> DetailedGlyphStore {

let i = self.detail_lookup.binary_search(&key)
.expect("Invalid index not found in detailed glyph lookup table!");

assert!(i + (detail_offset as usize) < self.detail_buffer.len());
&self.detail_buffer[i + (detail_offset as usize)]
let main_detail_offset = self.detail_lookup[i].detail_offset;
assert!(main_detail_offset + (detail_offset as usize) < self.detail_buffer.len());
&self.detail_buffer[main_detail_offset + (detail_offset as usize)]
}

fn ensure_sorted(&mut self) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.