2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function StripFont()
8 #include <proto/graphics.h>
9 #include <proto/exec.h>
10 #include <proto/utility.h>
11 #include <proto/oop.h>
12 #include "graphics_intern.h"
14 /*****************************************************************************
17 #include <clib/graphics_protos.h>
19 AROS_LH1(void, StripFont
,
22 AROS_LHA(struct TextFont
*, font
, A0
),
25 struct GfxBase
*, GfxBase
, 137, Graphics
)
28 Removes a TextFontExtension from a font.
31 font - font to remove extension from.
47 27-11-96 digulla automatically created from
48 graphics_lib.fd and clib/graphics_protos.h
50 *****************************************************************************/
54 struct TextFontExtension
*tfe
;
55 struct tfe_hashnode
*hn
;
57 /* Valid parameter ? */
61 /* Does the font have an extension ? */
63 ObtainSemaphore(&PrivGBase(GfxBase
)->fontsem
);
65 hn
= tfe_hashlookup(font
, GfxBase
);
70 if (hn
->font_bitmap
) OOP_DisposeObject(hn
->font_bitmap
);
71 if (hn
->chunky_colorfont
) FreeVec(hn
->chunky_colorfont
);
73 /* Remove the hashitem (tfe_hashdelete() has semaphore protection) */
74 tfe_hashdelete(font
, GfxBase
);
78 font
->tf_Extension
= tfe
->tfe_OrigReplyPort
;
80 /* Font is not tagged anymore */
81 font
->tf_Style
&= ~FSF_TAGGED
;
83 FreeTagItems(tfe
->tfe_Tags
);
84 FreeMem(tfe
, sizeof (struct TextFontExtension_intern
));
89 ReleaseSemaphore(&PrivGBase(GfxBase
)->fontsem
);