2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Remove a font from the list of public available fonts.
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
15 #include <graphics/text.h>
16 #include <proto/graphics.h>
18 AROS_LH1(void, RemFont
,
21 AROS_LHA(struct TextFont
*, textFont
, A1
),
24 struct GfxBase
*, GfxBase
, 81, Graphics
)
27 Remove a font from the list of public available fonts. Afterwards,
31 textFont - Remove this font.
43 OpenFont(), CloseFont(), SetFont(), AddFont()
49 *****************************************************************************/
53 struct TextFontExtension
*tfe
;
54 BOOL can_remove
= TRUE
;
56 ASSERT_VALID_PTR(textFont
);
59 tfe
= (struct TextFontExtension
*)textFont
->tf_Extension
;
62 if ((tfe
->tfe_MatchWord
== TFE_MATCHWORD
) && (tfe
->tfe_BackPtr
== textFont
))
64 if (tfe
->tfe_Flags0
& TE0F_NOREMFONT
)
74 if (!(textFont
->tf_Flags
& FPF_REMOVED
))
76 textFont
->tf_Flags
|= FPF_REMOVED
;
77 Remove (&textFont
->tf_Message
.mn_Node
);
82 D(bug("Someone tried to remove font which is already removed!"));