2 Copyright © 1995-2001, 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 *****************************************************************************/
52 AROS_LIBBASE_EXT_DECL(struct GfxBase
*,GfxBase
)
54 struct TextFontExtension
*tfe
;
55 BOOL can_remove
= TRUE
;
57 ASSERT_VALID_PTR(textFont
);
60 tfe
= (struct TextFontExtension
*)textFont
->tf_Extension
;
63 if ((tfe
->tfe_MatchWord
== TFE_MATCHWORD
) && (tfe
->tfe_BackPtr
== textFont
))
65 if (tfe
->tfe_Flags0
& TE0F_NOREMFONT
)
75 if (!(textFont
->tf_Flags
& FPF_REMOVED
))
77 textFont
->tf_Flags
|= FPF_REMOVED
;
78 Remove (&textFont
->tf_Message
.mn_Node
);
83 D(bug("Someone tried to remove font which is already removed!"));