< prev index next >

src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face-private.hh

Print this page




  33 
  34 #include "hb-object-private.hh"
  35 #include "hb-shaper-private.hh"
  36 #include "hb-shape-plan-private.hh"
  37 
  38 
  39 /*
  40  * hb_face_t
  41  */
  42 
  43 struct hb_face_t {
  44   hb_object_header_t header;
  45   ASSERT_POD ();
  46 
  47   hb_bool_t immutable;
  48 
  49   hb_reference_table_func_t  reference_table_func;
  50   void                      *user_data;
  51   hb_destroy_func_t          destroy;
  52 
  53   unsigned int index;
  54   mutable unsigned int upem;
  55   mutable unsigned int num_glyphs;
  56 
  57   struct hb_shaper_data_t shaper_data;
  58 




  59   struct plan_node_t {
  60     hb_shape_plan_t *shape_plan;
  61     plan_node_t *next;
  62   } *shape_plans;
  63 
  64 
  65   inline hb_blob_t *reference_table (hb_tag_t tag) const
  66   {
  67     hb_blob_t *blob;
  68 
  69     if (unlikely (!reference_table_func))
  70       return hb_blob_get_empty ();
  71 
  72     blob = reference_table_func (/*XXX*/const_cast<hb_face_t *> (this), tag, user_data);
  73     if (unlikely (!blob))
  74       return hb_blob_get_empty ();
  75 
  76     return blob;
  77   }
  78 




  33 
  34 #include "hb-object-private.hh"
  35 #include "hb-shaper-private.hh"
  36 #include "hb-shape-plan-private.hh"
  37 
  38 
  39 /*
  40  * hb_face_t
  41  */
  42 
  43 struct hb_face_t {
  44   hb_object_header_t header;
  45   ASSERT_POD ();
  46 
  47   hb_bool_t immutable;
  48 
  49   hb_reference_table_func_t  reference_table_func;
  50   void                      *user_data;
  51   hb_destroy_func_t          destroy;
  52 
  53   unsigned int index;                   /* Face index in a collection, zero-based. */
  54   mutable unsigned int upem;            /* Units-per-EM. */
  55   mutable unsigned int num_glyphs;      /* Number of glyphs. */
  56 
  57   struct hb_shaper_data_t shaper_data;  /* Various shaper data. */
  58 
  59   /* Various non-shaping data. */
  60   /* ... */
  61 
  62   /* Cache */
  63   struct plan_node_t {
  64     hb_shape_plan_t *shape_plan;
  65     plan_node_t *next;
  66   } *shape_plans;
  67 
  68 
  69   inline hb_blob_t *reference_table (hb_tag_t tag) const
  70   {
  71     hb_blob_t *blob;
  72 
  73     if (unlikely (!reference_table_func))
  74       return hb_blob_get_empty ();
  75 
  76     blob = reference_table_func (/*XXX*/const_cast<hb_face_t *> (this), tag, user_data);
  77     if (unlikely (!blob))
  78       return hb_blob_get_empty ();
  79 
  80     return blob;
  81   }
  82 


< prev index next >