2 Copyright © 1995-2010, 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
->chunky_colorfont
) FreeVec(hn
->chunky_colorfont
);
72 /* Remove the hashitem (tfe_hashdelete() has semaphore protection) */
73 tfe_hashdelete(font
, GfxBase
);
77 font
->tf_Extension
= tfe
->tfe_OrigReplyPort
;
79 /* Font is not tagged anymore */
80 font
->tf_Style
&= ~FSF_TAGGED
;
82 FreeTagItems(tfe
->tfe_Tags
);
83 FreeMem(tfe
, sizeof (struct TextFontExtension_intern
));
88 ReleaseSemaphore(&PrivGBase(GfxBase
)->fontsem
);