aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2016-05-18 10:50:31 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2016-05-19 09:44:56 -0700
commit0010b448b897afd8805b2f0976133b12a1b5411e (patch)
tree5d19cf106007a3bd3d162782d04aad61cc055ad1 /components/gfx/text
parent1eab6fbb2e71e8daeece6e29308f3be2b3c7c5a1 (diff)
downloadservo-0010b448b897afd8805b2f0976133b12a1b5411e.tar.gz
servo-0010b448b897afd8805b2f0976133b12a1b5411e.zip
Move hb_tag! macro and KERN into font module
Diffstat (limited to 'components/gfx/text')
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index ff765818069..9f5615e491b 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -5,7 +5,7 @@
use app_units::Au;
use euclid::Point2D;
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontTableMethods, FontTableTag};
-use font::{IGNORE_LIGATURES_SHAPING_FLAG, RTL_FLAG, ShapingOptions};
+use font::{IGNORE_LIGATURES_SHAPING_FLAG, KERN, RTL_FLAG, ShapingOptions};
use harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use harfbuzz::{hb_blob_create, hb_face_create_for_tables};
use harfbuzz::{hb_blob_t};
@@ -39,16 +39,8 @@ use text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use text::shaping::ShaperMethods;
use text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
-macro_rules! hb_tag {
- ($t1:expr, $t2:expr, $t3:expr, $t4:expr) => (
- (($t1 as u32) << 24) | (($t2 as u32) << 16) | (($t3 as u32) << 8) | ($t4 as u32)
- );
-}
-
const NO_GLYPH: i32 = -1;
-
-static KERN: u32 = hb_tag!('k', 'e', 'r', 'n');
-static LIGA: u32 = hb_tag!('l', 'i', 'g', 'a');
+const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');
pub struct ShapedGlyphData {
count: usize,