From d571a16dec70515c1cf77f9739262cc24ff08f70 Mon Sep 17 00:00:00 2001 From: Martin Dias Date: Sun, 5 May 2024 03:45:21 -0400 Subject: [PATCH] Freetype: Add binding for FT_Reference_Face --- src/Alexandrie-FreeType/AeFTFace.class.st | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Alexandrie-FreeType/AeFTFace.class.st b/src/Alexandrie-FreeType/AeFTFace.class.st index 5bd3db2..e49cc00 100644 --- a/src/Alexandrie-FreeType/AeFTFace.class.st +++ b/src/Alexandrie-FreeType/AeFTFace.class.st @@ -172,6 +172,17 @@ AeFTFace >> flags [ ^ AeFTFaceFlag bitFlagsAt: self faceFlags ] +{ #category : #finalization } +AeFTFace >> increaseReferenceCount [ + "A counter gets initialized to 1 at the time an instance is created. This function increments the counter. `FT_Done_Face` then only destroys a face if the counter is 1, otherwise it simply decrements the counter. + + This function helps in managing life-cycles of structures that reference FT_Face objects. + + See: https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_reference_face" + + ^ self ffiCall: #(int FT_Reference_Face (self)) +] + { #category : #testing } AeFTFace >> isBold [