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); }
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 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 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 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 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); }