On 04/12/2010 09:37 PM, Alan Coopersmith wrote:
> m.shulhan wrote:
>> Allow application to release _XftFTlibrary, for cleaning up unused memory.
> 
> If this is intended as new public API, shouldn't there be an addition to the
> man page for it?
> 

It should be. But, since there is no documentation about
XftInitFtLibrary in the man page, i am not quite sure how to put them
properly in the man page.

Calling Xft init and destroy is not a mandatory actually, it just that
when debugging X application with Valgrind, it print the garbage output
when client is not destroying the _XftFTlibrary manually.

Current attachment is a patch for the man page (Xft.man) that add
function definition for XftInitFtLibrary and XftDestroyFtLibrary.

--
>From 0d9c0baf50237cb26aaec539bacbdaa1edbbea15 Mon Sep 17 00:00:00 2001
From: m.shulhan <[email protected]>
Date: Tue, 13 Apr 2010 00:37:19 +0700
Subject: [PATCH libXft] Xft.man: add definition for XftInitFtLibrary and XftDestroyFtLibrary.

Signed-off-by: m.shulhan <[email protected]>
---
 man/Xft.man |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/man/Xft.man b/man/Xft.man
index 4ed2742..c035cc6 100644
--- a/man/Xft.man
+++ b/man/Xft.man
@@ -382,6 +382,26 @@ data type is defined by the FreeType library.
 .\" XftDrawGlyphFontSpec
 .\" XftGlyphFontSpecRender
 .SH FUNCTIONS
+.SS "Initializing and Destroying Xft Library"
+.nf
+\fBFcBool\fB\fR
+\fBXftInitFtLibrary(void);\fB\fR
+.fi
+.B XftInitFtLibrary
+initialize an internal FreeType library object.  Client can call this function
+directly, at the first time before using any Xft functions, or let the Xft
+library handle it internally.
+.B XftInitFtLibrary
+return 1 if success or if library already initialized, and 0 if failed.
+.PP
+.nf
+\fBvoid\fB\fR
+\fBXftDestroyFtLibrary(void);\fB\fR
+.fi
+.B XftDestroyFtLibrary
+destroy an internal FreeType library object and all of its children, including
+resources, drivers, faces, sizes, etc.
+.PP
 .SS "Opening and Matching Fonts"
 .nf
 \fBXftFont *\fR
-- 
1.6.4.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to