head	1.12;
access;
symbols
	core-8-5-9:1.11
	core-8-5-8:1.11
	macosx-cocoa-merge:1.12
	macosx-cocoa-premerge:1.12
	macosx-carbon-freeze:1.12
	core-8-5-7:1.11
	core-8-5-6:1.11
	core-8-6-b1:1.12
	core-8-6-a3:1.12
	core-8-5-5:1.11
	core-8-6-a2:1.12
	core-8-5-4:1.11
	core-8-5-3:1.11
	core-8-6-a1:1.11
	core-8-4-19:1.5.2.1
	core-8-5-branch:1.11.0.2
	core-8-5-2:1.11
	core-8-4-18:1.5.2.1
	core-8-5-1:1.11
	core-8-4-17:1.5.2.1
	core-8-5-0:1.11
	core-8-5-b3:1.10
	core-8-5-b2:1.9
	core-8-4-16:1.5.2.1
	core-8-5-b1:1.9
	core-stablilizer-merge:1.9
	core-stabilizer-branch:1.9.0.2
	core-stabilizer-merge:1.11
	core-8-4-15:1.5.2.1
	core-8-5-a6:1.9
	core-8-5-a5:1.8
	core-8-4-14:1.5.2.1
	core-8-5-a4:1.8
	core-8-4-13:1.5.2.1
	core-8-4-12:1.5.2.1
	core-8-4-11:1.5
	core-8-5-a3:1.6
	core-8-4-10:1.5
	core-8-4-9-branch:1.5.0.6
	core-8-5-a2:1.5
	core-8-4-9:1.5
	core-8-4-8:1.5
	core-8-4-7:1.5
	core-8-5-a1:1.5
	core-8-4-6:1.5
	core-8-4-5:1.5
	mistachkin-dev-branch:1.5.0.4
	core-8-4-4:1.5
	core-8-4-3:1.5
	core-8-4-branch:1.5.0.2
	core-8-4-2:1.5
	core-8-4-1:1.5
	core-8-3-5:1.3.12.1
	core-8-4-0:1.5
	macosx-8-4-merge-2002-08-31-trunk:1.5
	macosx-8-4-premerge-2002-08-31-branch:1.4.6.1
	macosx-8-4-premerge-2002-08-31-trunk:1.5
	macosx-8-4-merge-2002-08-30-branch:1.4.6.1
	macosx-8-4-merge-2002-08-30-trunk:1.5
	macosx-8-4-merge-2002-08-20-branch:1.4.6.1
	macosx-8-4-merge-2002-08-20-trunk:1.5
	core-8-4-b2:1.5
	core-8-4-b1:1.4
	macosx-premerge-6-9-02:1.4
	core-8-4-a4:1.4
	core-8-3-4:1.3.12.1
	macosx-8-4-branch:1.4.0.6
	macosx-8-4-branchpoint:1.4
	core-8-4-a3:1.4
	core-8-3-3:1.3.12.1
	dgp-privates-into-namespace:1.4.0.4
	tclpro-1-5-0:1.3
	core-8-4-win-speedup:1.4.0.2
	core-8-4-a2:1.4
	tclpro-1-4-1:1.3
	tclpro-1-4-0:1.3
	core-8-3-2:1.3
	ajuba-ajuba2-2-1-base:1.3
	ajuba-ajuba2-2-0:1.3
	core-8-4-a1:1.3
	core-8-3-1-branch:1.3.0.12
	core-8-3-1:1.3
	scriptics-sc-2-0-b5:1.3
	scriptics-sc-2-0-fixed:1.3
	scriptics-sc-2-0-b2:1.3
	scriptics-sc-2-0-b1:1.3
	core-8-3-0:1.3
	core-8-3-b2:1.3
	core-8-3-b1:1.3
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.10
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.8
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.6
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.4
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.2
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.12
date	2008.06.30.22.57.01;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.10;

1.10
date	2007.10.29.16.04.12;	author dkf;	state Exp;
branches;
next	1.9;

1.9
date	2007.01.05.00.00.48;	author nijtmans;	state Exp;
branches
	1.9.2.1;
next	1.8;

1.8
date	2005.11.22.11.59.04;	author dkf;	state Exp;
branches;
next	1.7;

1.7
date	2005.08.18.18.41.18;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	2002.08.05.04.30.38;	author dgp;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2000.07.25.21.14.34;	author jenglish;	state Exp;
branches
	1.4.6.1;
next	1.3;

1.3
date	99.04.16.01.51.08;	author stanton;	state Exp;
branches
	1.3.12.1;
next	1.2;

1.2
date	98.09.14.18.22.49;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.40.04;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.08;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.15.55;	author stanton;	state Exp;
branches;
next	;

1.3.12.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	;

1.4.6.1
date	2002.08.20.20.27.00;	author das;	state Exp;
branches;
next	;

1.5.2.1
date	2005.11.22.11.55.19;	author dkf;	state Exp;
branches;
next	;

1.9.2.1
date	2007.11.01.16.37.12;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.12
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@'\"
'\" Copyright (c) 1990-1992 The Regents of the University of California.
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: GetFont.3,v 1.11 2007/12/13 15:23:43 dgp Exp $
'\" 
.so man.macros
.TH Tk_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FreeFontFromObj, Tk_FreeFont \- maintain database of fonts
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
Tk_Font 
\fBTk_AllocFontFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
Tk_Font 
\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR 
.sp
Tk_Font 
\fBTk_GetFontFromObj(\fItkwin, objPtr\fB)\fR
.sp
const char *
\fBTk_NameOfFont(\fItkfont\fB)\fR
.sp
Tk_Font 
\fBTk_FreeFontFromObj(\fItkwin, objPtr\fB)\fR
.sp
void
\fBTk_FreeFont(\fItkfont\fB)\fR
.SH ARGUMENTS
.AS "const char" *tkfont
.AP "Tcl_Interp" *interp in
Interpreter to use for error reporting.  If \fBNULL\fR, then no error
messages are left after errors.
.AP Tk_Window tkwin in
Token for window in which font will be used.
.AP Tcl_Obj *objPtr in/out
Gives name or description of font.  See documentation
for the \fBfont\fR command for details on acceptable formats.
Internal rep will be modified to cache corresponding Tk_Font.
.AP "const char" *string in
Same as \fIobjPtr\fR except description of font is passed as a string and
resulting Tk_Font is not cached.
.AP Tk_Font tkfont in
Opaque font token.
.BE
.SH DESCRIPTION
.PP
\fBTk_AllocFontFromObj\fR finds the font indicated by \fIobjPtr\fR and
returns a token that represents the font.  The return value can be used
in subsequent calls to procedures such as \fBTk_GetFontMetrics\fR,
\fBTk_MeasureChars\fR, and \fBTk_FreeFont\fR.  The Tk_Font token
will remain valid until
\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR is called to release it. 
\fIObjPtr\fR can contain either a symbolic name or a font description; see
the documentation for the \fBfont\fR command for a description of the
valid formats.  If \fBTk_AllocFontFromObj\fR is unsuccessful (because,
for example, \fIobjPtr\fR did not contain a valid font specification) then it
returns \fBNULL\fR and leaves an error message in \fIinterp\fR's result
if \fIinterp\fR is not \fBNULL\fR.  \fBTk_AllocFontFromObj\fR caches
information about the return
value in \fIobjPtr\fR, which speeds up future calls to procedures
such as \fBTk_AllocFontFromObj\fR and \fBTk_GetFontFromObj\fR.
.PP
\fBTk_GetFont\fR is identical to \fBTk_AllocFontFromObj\fR except
that the description of the font is specified with a string instead
of an object.  This prevents \fBTk_GetFont\fR from caching the
matching Tk_Font, so \fBTk_GetFont\fR is less efficient than
\fBTk_AllocFontFromObj\fR.
.PP
\fBTk_GetFontFromObj\fR returns the token for an existing font, given
the window and description used to create the font.
\fBTk_GetFontFromObj\fR does not actually create the font; the font
must already have been created with a previous call to
\fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR.  The return
value is cached in \fIobjPtr\fR, which speeds up
future calls to \fBTk_GetFontFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.PP
\fBTk_AllocFontFromObj\fR and \fBTk_GetFont\fR maintain
a database of all fonts they have allocated.  If
the same font is requested multiple times (e.g. by different
windows or for different purposes), then a single Tk_Font will be
shared for all uses.  The underlying resources will be freed automatically
when no-one is using the font anymore.
.PP
The procedure \fBTk_NameOfFont\fR is roughly the inverse of
\fBTk_GetFont\fR.  Given a \fItkfont\fR that was created by
\fBTk_GetFont\fR (or \fBTk_AllocFontFromObj\fR), the return value is
the \fIstring\fR argument that was
passed to \fBTk_GetFont\fR to create the font.  The string returned by
\fBTk_NameOfFont\fR is only guaranteed to persist until the \fItkfont\fR
is deleted.  The caller must not modify this string.
.PP
When a font is no longer needed,
\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR should be called to
release it.  For \fBTk_FreeFontFromObj\fR the font to release is specified
with the same information used to create it; for
\fBTk_FreeFont\fR the font to release is specified
with its Tk_Font token.  There should be
exactly one call to \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR
for each call to \fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR.
.SH "SEE ALSO"
Tk_FontId(3)
.SH KEYWORDS
font
@


1.11
log
@merge stable branch onto HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.9.2.1 2007/11/01 16:37:12 dgp Exp $
a35 1

a108 1

@


1.10
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $
@


1.9
log
@various "const" additions, in line with TIP #27
fix bug #1627732
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.8 2005/11/22 11:59:04 dkf Exp $
d50 1
a50 1
resulting Tk_Font isn't cached.
d67 1
a67 1
if \fIinterp\fR isn't \fBNULL\fR.  \fBTk_AllocFontFromObj\fR caches
d80 1
a80 1
\fBTk_GetFontFromObj\fR doesn't actually create the font; the font
@


1.9.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.9 2007/01/05 00:00:48 nijtmans Exp $
d50 1
a50 1
resulting Tk_Font is not cached.
d67 1
a67 1
if \fIinterp\fR is not \fBNULL\fR.  \fBTk_AllocFontFromObj\fR caches
d80 1
a80 1
\fBTk_GetFontFromObj\fR does not actually create the font; the font
@


1.8
log
@Fix [Bug 1151523] the non-embarrasing way!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.7 2005/08/18 18:41:18 dkf Exp $
d28 1
a28 1
CONST char *
@


1.7
log
@Fix [Bug 1151523]
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.6 2005/04/06 21:11:54 dkf Exp $
d40 2
a41 1
Interpreter to use for error reporting.  Must not be NULL.
d67 1
a67 1
if \fIinterp\fR isn't NULL.  \fBTk_AllocFontFromObj\fR caches
@


1.6
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.5 2002/08/05 04:30:38 dgp Exp $
d40 1
a40 2
Interpreter to use for error reporting.  If NULL, then no error
messages are left after errors.
@


1.5
log
@Applied companion patch for Tcl Patch 585105,
updating Tk to use Tcl 8.4's fully CONST-ified
interface, and fully CONSTifying Tk at the
same time.

This patch includes purging Tk of its last
direct access to interp->result.  [Bug 589853]

The substantial changes include copying
event sequence strings into Tcl_DStrings
in tkBind.c, and copying [text] indices into
Tcl_DStrings because parsing them involved
overwriting them.  If this causes performance
trouble, that can be resolved by further
converting them to Tcl_Obj's.

The #defines USE_NON_CONST and USE_COMPAT_CONST
have the same effect for Tk as they do for Tcl.
(They actually change tcl.h)
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.4 2000/07/25 21:14:34 jenglish Exp $
a18 1
.VS 8.1
a26 1
.VE
a30 1
.VS 8.1
a32 1
.VE
a43 1
.VS 8.1 br
a50 1
.VE
a55 1
.VS 8.1
a85 1
.VE
a101 1
.VS 8.1
a109 1
.VE
a112 1

@


1.5.2.1
log
@Highlighting fix
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.5 2002/08/05 04:30:38 dgp Exp $
d44 1
a44 1
Interpreter to use for error reporting.  If \fBNULL\fR, then no error
d74 1
a74 1
if \fIinterp\fR isn't \fBNULL\fR.  \fBTk_AllocFontFromObj\fR caches
@


1.4
log
@CanvPsY.3, ConfigWidg.3, CrtImgType.3, CrtItemType.3,
FontId.3, GetFont.3, canvas.n, font.n, options.n, text.n:
Documentation fix: Replaced references to XFontStruct *
and Tk_FontStruct with Tk_Font.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.3 1999/04/16 01:51:08 stanton Exp $
d30 1
a30 1
char *
@


1.4.6.1
log
@merged with trunk at tag macosx-8-4-merge-2002-08-20-trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d30 1
a30 1
CONST char *
@


1.3
log
@* Merged 8.1 branch into the main trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d65 1
a65 1
in subsequent calls to procedures such as \fBTk_FontMetrics\fR,
d120 3
@


1.3.12.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.4 2000/07/25 21:14:34 jenglish Exp $
d65 1
a65 1
in subsequent calls to procedures such as \fBTk_GetFontMetrics\fR,
a119 3

.SH "SEE ALSO"
Tk_FontId(3)
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
d11 1
a11 1
.TH Tk_GetFont 3 "" Tk "Tk Library Procedures"
d14 1
a14 1
Tk_GetFont, Tk_NameOfFont, Tk_FreeFont \- maintain database of fonts
d19 1
d21 8
a28 1
\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR
d33 5
d44 2
a45 1
Interpreter to use for error reporting.
d47 6
a52 1
Token for window on the display in which font will be used.
d54 3
a56 2
Name or description of desired font.  See documentation for the \fBfont\fR 
command for details on acceptable formats.
d62 39
a100 16
\fBTk_GetFont\fR finds the font indicated by \fIstring\fR and returns a
token that represents the font.  The return value can be used in subsequent
calls to procedures such as \fBTk_FontMetrics\fR, \fBTk_MeasureChars\fR, and
\fBTk_FreeFont\fR.  The token returned by \fBTk_GetFont\fR will remain
valid until \fBTk_FreeFont\fR is called to release it.  \fIString\fR can
be either a symbolic name or a font description; see the documentation for
the \fBfont\fR command for a description of the valid formats.  If
\fBTk_GetFont\fR is unsuccessful (because, for example, \fIstring\fR was
not a valid font specification) then it returns \fBNULL\fR and stores an
error message in \fIinterp->result\fR.
.PP
\fBTk_GetFont\fR maintains a database of all fonts it has allocated.  If
the same \fIstring\fR is requested multiple times (e.g. by different
windows or for different purposes), then additional calls for the same
\fIstring\fR will be handled without involving the platform-specific
graphics server.
d104 2
a105 1
\fBTk_GetFont\fR, the return value is the \fIstring\fR argument that was
d110 10
a119 6
When a font returned by \fBTk_GetFont\fR is no longer needed,
\fBTk_FreeFont\fR should be called to release it.  There should be
exactly one call to \fBTk_FreeFont\fR for each call to \fBTk_GetFont\fR.
When a font is no longer in use anywhere (i.e. it has been freed as many
times as it has been gotten) \fBTk_FreeFont\fR will release any
platform-specific storage and delete it from the database.  
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) GetFont.3 1.11 96/07/31 14:07:40
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d3 1
a3 1
'\" Copyright (c) 1994-1998 Sun Microsystems, Inc.
d8 1
a8 1
'\" SCCS: @@(#) GetFont.3 1.12 98/01/14 13:58:59
d11 1
a11 1
.TH Tk_AllocFontFromObj 3 8.1 Tk "Tk Library Procedures"
d14 1
a14 1
Tk_AllocFontFromObj, Tk_GetFont, Tk_GetFontFromObj, Tk_NameOfFont, Tk_FreeFontFromObj, Tk_FreeFont \- maintain database of fonts
a18 1
.VS 8.1
d20 1
a20 8
\fBTk_AllocFontFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
Tk_Font 
\fBTk_GetFont(\fIinterp, tkwin, string\fB)\fR 
.sp
Tk_Font 
\fBTk_GetFontFromObj(\fItkwin, objPtr\fB)\fR
.VE
a24 5
.VS 8.1
Tk_Font 
\fBTk_FreeFontFromObj(\fItkwin, objPtr\fB)\fR
.VE
.sp
d31 1
a31 2
Interpreter to use for error reporting.  If NULL, then no error
messages are left after errors.
d33 1
a33 6
Token for window in which font will be used.
.VS 8.1 br
.AP Tcl_Obj *objPtr in/out
Gives name or description of font.  See documentation
for the \fBfont\fR command for details on acceptable formats.
Internal rep will be modified to cache corresponding Tk_Font.
d35 2
a36 3
Same as \fIobjPtr\fR except description of font is passed as a string and
resulting Tk_Font isn't cached.
.VE
d42 16
a57 39
.VS 8.1
\fBTk_AllocFontFromObj\fR finds the font indicated by \fIobjPtr\fR and
returns a token that represents the font.  The return value can be used
in subsequent calls to procedures such as \fBTk_FontMetrics\fR,
\fBTk_MeasureChars\fR, and \fBTk_FreeFont\fR.  The Tk_Font token
will remain valid until
\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR is called to release it. 
\fIObjPtr\fR can contain either a symbolic name or a font description; see
the documentation for the \fBfont\fR command for a description of the
valid formats.  If \fBTk_AllocFontFromObj\fR is unsuccessful (because,
for example, \fIobjPtr\fR did not contain a valid font specification) then it
returns \fBNULL\fR and leaves an error message in \fIinterp\fR's result
if \fIinterp\fR isn't NULL.  \fBTk_AllocFontFromObj\fR caches
information about the return
value in \fIobjPtr\fR, which speeds up future calls to procedures
such as \fBTk_AllocFontFromObj\fR and \fBTk_GetFontFromObj\fR.
.PP
\fBTk_GetFont\fR is identical to \fBTk_AllocFontFromObj\fR except
that the description of the font is specified with a string instead
of an object.  This prevents \fBTk_GetFont\fR from caching the
matching Tk_Font, so \fBTk_GetFont\fR is less efficient than
\fBTk_AllocFontFromObj\fR.
.PP
\fBTk_GetFontFromObj\fR returns the token for an existing font, given
the window and description used to create the font.
\fBTk_GetFontFromObj\fR doesn't actually create the font; the font
must already have been created with a previous call to
\fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR.  The return
value is cached in \fIobjPtr\fR, which speeds up
future calls to \fBTk_GetFontFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
.VE
.PP
\fBTk_AllocFontFromObj\fR and \fBTk_GetFont\fR maintain
a database of all fonts they have allocated.  If
the same font is requested multiple times (e.g. by different
windows or for different purposes), then a single Tk_Font will be
shared for all uses.  The underlying resources will be freed automatically
when no-one is using the font anymore.
d61 1
a61 2
\fBTk_GetFont\fR (or \fBTk_AllocFontFromObj\fR), the return value is
the \fIstring\fR argument that was
d66 6
a71 10
.VS 8.1
When a font is no longer needed,
\fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR should be called to
release it.  For \fBTk_FreeFontFromObj\fR the font to release is specified
with the same information used to create it; for
\fBTk_FreeFont\fR the font to release is specified
with its Tk_Font token.  There should be
exactly one call to \fBTk_FreeFontFromObj\fR or \fBTk_FreeFont\fR
for each call to \fBTk_AllocFontFromObj\fR or \fBTk_GetFont\fR.
.VE
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: GetFont.3,v 1.2 1998/09/14 18:22:49 stanton Exp $
@


