src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-var.cc
changeset 50826 f5b95be8b6e2
parent 48274 51772bf1fb0c
child 54232 7c11a7cc7c1d
equal deleted inserted replaced
50825:aa0a35b071fb 50826:f5b95be8b6e2
    37  */
    37  */
    38 
    38 
    39 static inline const OT::fvar&
    39 static inline const OT::fvar&
    40 _get_fvar (hb_face_t *face)
    40 _get_fvar (hb_face_t *face)
    41 {
    41 {
    42   if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::fvar);
    42   if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::fvar);
    43   hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
    43   hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
    44   return *(layout->fvar.get ());
    44   return *(layout->fvar.get ());
    45 }
    45 }
    46 static inline const OT::avar&
    46 static inline const OT::avar&
    47 _get_avar (hb_face_t *face)
    47 _get_avar (hb_face_t *face)
    48 {
    48 {
    49   if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return OT::Null(OT::avar);
    49   if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::avar);
    50   hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
    50   hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
    51   return *(layout->avar.get ());
    51   return *(layout->avar.get ());
    52 }
    52 }
    53 
    53 
    54 /**
    54 /**
    63  * Since: 1.4.2
    63  * Since: 1.4.2
    64  **/
    64  **/
    65 hb_bool_t
    65 hb_bool_t
    66 hb_ot_var_has_data (hb_face_t *face)
    66 hb_ot_var_has_data (hb_face_t *face)
    67 {
    67 {
    68   return &_get_fvar (face) != &OT::Null(OT::fvar);
    68   return &_get_fvar (face) != &Null(OT::fvar);
    69 }
    69 }
    70 
    70 
    71 /**
    71 /**
    72  * hb_ot_var_get_axis_count:
    72  * hb_ot_var_get_axis_count:
    73  *
    73  *