public void SetHorizontalGlyphAdvanceDelegate(GlyphAdvanceDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_advance_func(Handle, DelegateProxies.GlyphAdvanceProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetNominalGlyphsDelegate(NominalGlyphsDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_nominal_glyphs_func(Handle, DelegateProxies.NominalGlyphsProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetVariationGlyphDelegate(VariationGlyphDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_variation_glyph_func(Handle, DelegateProxies.VariationGlyphProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetGlyphFromNameDelegate(GlyphFromNameDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_from_name_func(Handle, DelegateProxies.GlyphFromNameProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetVerticalFontExtentsDelegate(FontExtentsDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_font_v_extents_func(Handle, DelegateProxies.FontExtentsProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetGlyphContourPointDelegate(GlyphContourPointDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_contour_point_func(Handle, DelegateProxies.GlyphContourPointProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetVerticalGlyphOriginDelegate(GlyphOriginDelegate del, ReleaseDelegate destroy) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_v_origin_func(Handle, DelegateProxies.GlyphOriginProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetComposeDelegate(ComposeDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, new UserDataDelegate(() => this), destroy); HarfBuzzApi.hb_unicode_funcs_set_compose_func(Handle, DelegateProxies.ComposeProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetScriptDelegate(ScriptDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMultiUserData(del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_script_func( Handle, DelegateProxies.ScriptProxy, (void *)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetFontFunctions(FontFunctions fontFunctions, object fontData, ReleaseDelegate destroy) { _ = fontFunctions ?? throw new ArgumentNullException(nameof(fontFunctions)); var container = new FontUserData(this, fontData); var ctx = DelegateProxies.CreateMultiUserData(destroy, container); HarfBuzzApi.hb_font_set_funcs(Handle, fontFunctions.Handle, (void *)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
private static IntPtr Create(IntPtr data, int length, MemoryMode mode, object context, ReleaseDelegate releaseProc) { var del = releaseProc != null && context != null ? new ReleaseDelegate((_) => releaseProc(context)) : releaseProc; var proxy = DelegateProxies.Create(del, DelegateProxies.ReleaseDelegateProxy, out _, out var ctx); return(HarfBuzzApi.hb_blob_create(data, length, mode, ctx, proxy)); }
public void SetGeneralCategoryDelegate(GeneralCategoryDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMultiUserData(del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_general_category_func( Handle, DelegateProxies.GeneralCategoryProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetDecomposeDelegate(DecomposeDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMultiUserData(del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_decompose_func( Handle, DelegateProxies.DecomposeProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetCombiningClassDelegate(CombiningClassDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMultiUserData(del, destroy, this); HarfBuzzApi.hb_unicode_funcs_set_combining_class_func( Handle, DelegateProxies.CombiningClassProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetGlyphExtentsDelegate(GlyphExtentsDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_extents_func( Handle, DelegateProxies.GlyphExtentsProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetHorizontalGlyphKerningDelegate(GlyphKerningDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_h_kerning_func( Handle, DelegateProxies.GlyphKerningProxy, (void *)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public void SetVerticalGlyphAdvancesDelegate(GlyphAdvancesDelegate del, ReleaseDelegate destroy = null) { VerifyParameters(del); var ctx = DelegateProxies.CreateMulti(del, destroy); HarfBuzzApi.hb_font_funcs_set_glyph_v_advances_func( Handle, DelegateProxies.GlyphAdvancesProxy, (void *)ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public Face(GetTableDelegate getTable, object context, ReleaseDelegate destroy) : this(IntPtr.Zero) { if (getTable == null) { throw new ArgumentNullException(nameof(getTable)); } var ctx = DelegateProxies.CreateMulti <GetTableDelegate> ((_, t, __) => getTable.Invoke(this, t, context), context, destroy); Handle = HarfBuzzApi.hb_face_create_for_tables(DelegateProxies.GetTableDelegateProxy, ctx, DelegateProxies.ReleaseDelegateProxyForMulti); }
public Face(GetTableDelegate getTable, ReleaseDelegate destroy) : this(IntPtr.Zero) { if (getTable == null) { throw new ArgumentNullException(nameof(getTable)); } Handle = HarfBuzzApi.hb_face_create_for_tables( DelegateProxies.GetTableDelegateProxy, DelegateProxies.CreateMultiUserData(getTable, destroy, this), DelegateProxies.ReleaseDelegateProxyForMulti); }
private static IntPtr Create(IntPtr data, int length, MemoryMode mode, ReleaseDelegate releaseProc) { var proxy = DelegateProxies.Create(releaseProc, DelegateProxies.ReleaseDelegateProxy, out _, out var ctx); return(HarfBuzzApi.hb_blob_create(data, length, mode, ctx, proxy)); }