Move ByteIndex to gfx_traits.

This commit is contained in:
Ms2ger 2016-06-14 16:05:08 +01:00
parent c270622bfd
commit e5cab36671
5 changed files with 19 additions and 8 deletions

View file

@ -11,6 +11,8 @@ use std::cmp::{Ordering, PartialOrd};
use std::vec::Vec;
use std::{fmt, mem, u16};
pub use gfx_traits::ByteIndex;
/// GlyphEntry is a port of Gecko's CompressedGlyph scheme for storing glyph data compactly.
///
/// In the common case (reasonable glyph advances, no offsets from the font em-box, and one glyph
@ -426,14 +428,6 @@ pub struct GlyphStore {
is_rtl: bool,
}
int_range_index! {
#[derive(Deserialize, Serialize, RustcEncodable)]
#[doc = "An index that refers to a byte offset in a text run. This could \
point to the middle of a glyph."]
#[derive(HeapSizeOf)]
struct ByteIndex(isize)
}
impl<'a> GlyphStore {
/// Initializes the glyph store, but doesn't actually shape anything.
///