diff --git a/font.rs b/font.rs index dc86609..60e2deb 100644 --- a/font.rs +++ b/font.rs @@ -31,6 +31,13 @@ pub struct CGFont { } impl CGFont { + /// Convenience method to make it easier to wrap external `CGFont` instances. + pub fn wrap_owned(font: CGFontRef) -> CGFont { + CGFont { + contents: CFWrapper::wrap_owned(font) + } + } + /// Convenience method to make it easier to wrap external `CGFont` instances. pub fn wrap_shared(font: CGFontRef) -> CGFont { CGFont {