mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
Move ByteIndex to gfx_traits.
This commit is contained in:
parent
c270622bfd
commit
e5cab36671
5 changed files with 19 additions and 8 deletions
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue