From b669cc708708e1fea6aa370428a09e88a881a397 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 8 May 2020 14:25:43 -0700 Subject: [PATCH] Document `PFCanvasFontContextCreateWithFonts()`. Closes #247. --- c/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c/src/lib.rs b/c/src/lib.rs index ce322344..d1fd1754 100644 --- a/c/src/lib.rs +++ b/c/src/lib.rs @@ -209,6 +209,10 @@ pub unsafe extern "C" fn PFCanvasFontContextCreateWithSystemSource() -> PFCanvas Box::into_raw(Box::new(CanvasFontContext::from_system_source())) } +/// Creates a Pathfinder font context from a set of `font-kit` fonts. +/// +/// Note that `font-kit` itself has a C API. You can use this to load fonts from memory with e.g. +/// `FKHandleCreateWithMemory()`. #[no_mangle] pub unsafe extern "C" fn PFCanvasFontContextCreateWithFonts(fonts: *const FKHandleRef, font_count: usize)