Remove some deprecation comments

The fallback font functions have been commented as deprecated for ~15
years now.
I cannot remember what the problem may or may not have been, so let's
just drop the comments.

Also, move the call to free a fallback font in imlib_free_font() to the
internals (avoiding to call deprecated functions if the font fallback
chain stuff should be deprecated for real some day).
This commit is contained in:
Kim Woelders 2022-03-17 15:04:22 +01:00
parent d93ab097bf
commit e47e1a6cf4
3 changed files with 4 additions and 13 deletions

View File

@ -381,7 +381,6 @@ EAPI void imlib_image_tile(void);
EAPI Imlib_Font imlib_load_font(const char *font_name);
EAPI void imlib_free_font(void);
/* NB! The four functions below are deprecated. */
EAPI int imlib_insert_font_into_fallback_chain(Imlib_Font font,
Imlib_Font
fallback_font);
@ -390,7 +389,6 @@ EAPI void imlib_remove_font_from_fallback_chain(Imlib_Font
EAPI Imlib_Font imlib_get_prev_font_in_fallback_chain(Imlib_Font fn);
EAPI Imlib_Font imlib_get_next_font_in_fallback_chain(Imlib_Font fn);
/* NB! The four functions above are deprecated. */
EAPI void imlib_text_draw(int x, int y, const char *text);
EAPI void imlib_text_draw_with_return_metrics(int x, int y,
const char *text,

View File

@ -2862,7 +2862,6 @@ EAPI void
imlib_free_font(void)
{
CHECK_PARAM_POINTER("font", ctx->font);
imlib_remove_font_from_fallback_chain(ctx->font);
__imlib_font_free(ctx->font);
ctx->font = NULL;
}
@ -2880,8 +2879,6 @@ imlib_free_font(void)
* removed from any chain it's already in.
* A fallback font may be a member of only one chain. Adding it as the
* fallback font to another font will remove it from it's first fallback chain.
*
* @deprecated This function may be removed.
**/
EAPI int
imlib_insert_font_into_fallback_chain(Imlib_Font font, Imlib_Font fallback_font)
@ -2898,8 +2895,6 @@ imlib_insert_font_into_fallback_chain(Imlib_Font font, Imlib_Font fallback_font)
* This removes the given font from any fallback chain it may be in.
* Removing this font joins its previous and next font together in the fallback
* chain.
*
* @deprecated This function may be removed.
**/
EAPI void
imlib_remove_font_from_fallback_chain(Imlib_Font fallback_font)
@ -2908,9 +2903,7 @@ imlib_remove_font_from_fallback_chain(Imlib_Font fallback_font)
__imlib_font_remove_from_fallback_chain_imp(fallback_font);
}
/**
* @deprecated This function may be removed.
**/
/** Return previous font in font fallback chain */
EAPI Imlib_Font
imlib_get_prev_font_in_fallback_chain(Imlib_Font fn)
{
@ -2918,9 +2911,7 @@ imlib_get_prev_font_in_fallback_chain(Imlib_Font fn)
return ((ImlibFont *) fn)->fallback_prev;
}
/**
* @deprecated This function may be removed.
**/
/** Return next font in font fallback chain */
EAPI Imlib_Font
imlib_get_next_font_in_fallback_chain(Imlib_Font fn)
{

View File

@ -207,6 +207,8 @@ __imlib_font_load(const char *name, int faceidx, int size)
void
__imlib_font_free(ImlibFont * fn)
{
__imlib_font_remove_from_fallback_chain_imp(fn);
fn->references--;
if (fn->references == 0)
{