aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-06-14 16:05:08 +0100
committerMs2ger <Ms2ger@gmail.com>2016-06-20 19:02:35 +0200
commite5cab3667165765669f2546aa683cfe73e0494af (patch)
tree168fc7da58bc31d529c876cfb452cfec87ce8cc4 /components/gfx/text
parentc270622bfdd7a409c1a940322f630fd6cbd985c0 (diff)
downloadservo-e5cab3667165765669f2546aa683cfe73e0494af.tar.gz
servo-e5cab3667165765669f2546aa683cfe73e0494af.zip
Move ByteIndex to gfx_traits.
Diffstat (limited to 'components/gfx/text')
-rw-r--r--components/gfx/text/glyph.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs
index fe9dc415625..9e5e7cf732e 100644
--- a/components/gfx/text/glyph.rs
+++ b/components/gfx/text/glyph.rs
@@ -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.
///