[pango/harfbuzz-ng] [GSUB] Add GSUB::substitute_lookup()
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng] [GSUB] Add GSUB::substitute_lookup()
- Date: Sun, 17 May 2009 19:48:35 -0400 (EDT)
commit 75778ef4af51ce974fc9af25063f7bb239563b5a
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri May 15 20:11:10 2009 -0400
[GSUB] Add GSUB::substitute_lookup()
---
pango/opentype/hb-ot-layout-gsub-private.h | 7 +++++++
pango/opentype/hb-ot-layout.cc | 5 +----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-gsub-private.h b/pango/opentype/hb-ot-layout-gsub-private.h
index 2bf1e9f..3980c6c 100644
--- a/pango/opentype/hb-ot-layout-gsub-private.h
+++ b/pango/opentype/hb-ot-layout-gsub-private.h
@@ -692,6 +692,7 @@ struct ContextSubstFormat1 {
};
ASSERT_SIZE (ContextSubstFormat1, 6);
+
struct SubClassRule {
/* TODO */
@@ -1177,6 +1178,12 @@ struct GSUB : GSUBGPOS {
return *(SubstLookup*)&(((GSUBGPOS *)this)->get_lookup (i));
}
+ inline bool substitute_lookup (hb_ot_layout_t *layout,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_ot_layout_feature_mask_t mask) const {
+ return get_lookup (lookup_index).substitute_string (layout, buffer, mask);
+ }
};
DEFINE_NULL_ALIAS (GSUB, GSUBGPOS);
diff --git a/pango/opentype/hb-ot-layout.cc b/pango/opentype/hb-ot-layout.cc
index 0cbc1bf..1d696c7 100644
--- a/pango/opentype/hb-ot-layout.cc
+++ b/pango/opentype/hb-ot-layout.cc
@@ -529,10 +529,7 @@ hb_ot_layout_substitute_lookup (hb_ot_layout_t *layout,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask)
{
- const GSUB &gsub = *(layout->gsub);
- const SubstLookup &l = gsub.get_lookup (lookup_index);
-
- return l.substitute_string (layout, buffer, mask);
+ return layout->gsub->substitute_lookup (layout, buffer, lookup_index, mask);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]