Merge pull request #326 from pcwalton/c-font-context-docs

Document `PFCanvasFontContextCreateWithFonts()`.
This commit is contained in:
Patrick Walton 2020-05-08 15:10:07 -07:00 committed by GitHub
commit feb6cca419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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)