Function

HarfBuzz-0.0HarfBuzzft_font_createSince 0.9.2

  • Creates an HarfBuzz.font_t font object from the specified FT_Face.

    Note: You must set the face size on ft_face before calling hb_ft_font_create() on it. HarfBuzz assumes size is always set and will access size member of FT_Face unconditionally.

    This variant of the function does not provide any life-cycle management.

    Most client programs should use hb_ft_font_create_referenced() instead.

    If you know you have valid reasons not to use hb_ft_font_create_referenced(), then it is the client program's responsibility to destroy ft_face only after the HarfBuzz.font_t font object has been destroyed.

    HarfBuzz will use the destroy callback on the HarfBuzz.font_t font object if it is supplied when you use this function. However, even if destroy is provided, it is the client program's responsibility to destroy ft_face, and it is the client program's responsibility to ensure that ft_face is destroyed only after the HarfBuzz.font_t font object has been destroyed.

    Parameters

    • ft_face: Face

      FT_Face to work upon

    • destroy: destroy_func_t

      A callback to call when the font object is not needed anymore

    Returns font_t

    the new HarfBuzz.font_t font object

    0.9.2