kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=e47e1a6cf4ab7243f0c33e7d4442c9e56a2a3713

commit e47e1a6cf4ab7243f0c33e7d4442c9e56a2a3713
Author: Kim Woelders <k...@woelders.dk>
Date:   Thu Mar 17 15:04:22 2022 +0100

    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).
---
 src/lib/Imlib2.h.in |  2 --
 src/lib/api.c       | 13 ++-----------
 src/lib/font_load.c |  2 ++
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/lib/Imlib2.h.in b/src/lib/Imlib2.h.in
index a7f9615..1456c1c 100644
--- a/src/lib/Imlib2.h.in
+++ b/src/lib/Imlib2.h.in
@@ -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,
diff --git a/src/lib/api.c b/src/lib/api.c
index 50f4b3d..1454c2a 100644
--- a/src/lib/api.c
+++ b/src/lib/api.c
@@ -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)
 {
diff --git a/src/lib/font_load.c b/src/lib/font_load.c
index de83a5f..f4ba633 100644
--- a/src/lib/font_load.c
+++ b/src/lib/font_load.c
@@ -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)
      {

-- 


Reply via email to