bugThe FreeType Project - Bugs: bug #46326, Further improve documentation of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46326: Further improve documentation of `FT_Get_MM_Var'.

Submitter:  bungeman <bungeman>
Submitted:  Thu 29 Oct 2015 08:14:37 PM UTC
   
 
Severity:  3 - Normal Item Group:  Wishlist
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.9

Jump to the original submission

Mon 08 Jan 2018 07:13:51 PM UTC, comment #6: 

Indeed!  Thanks for pointing this out.

Werner LEMBERG <wl>
Group administrator
Mon 08 Jan 2018 04:39:19 PM UTC, comment #5: 

I think this can be closed now that FT_Done_MM_Var has been added.

bungeman <bungeman>
Thu 11 Feb 2016 06:22:24 AM UTC, comment #4: 

Any progress?

Werner LEMBERG <wl>
Group administrator
Sat 31 Oct 2015 05:41:59 AM UTC, comment #3: 

For consistency with the current API, I vote for option 2, taking an `FT_Library' parameter (BTW, you probably mean `FT_Bitmap_Done' instead of `FT_Stroker_Done', since the latter doesn't have a second argument).  By the same token, the new function names should be then `FT_MM_Var_New' and `FT_MM_Var_Done', respectively.

Thanks for looking into this!

Werner LEMBERG <wl>
Group administrator
Fri 30 Oct 2015 10:37:13 PM UTC, comment #2: 

There is an issue with implementing FT_Done_MM_Var in the 'straight forward' way, which is that there is currently no pointer from the FT_MM_Var to an FT_Memory. The options appear to be:

1. Put a pointer to an FT_Memory at the end of the FT_MM_Var allocation and use that. This doesn't work well with shutdown, as now the FT_MM_Var lifetime is tied to the FT_Memory lifetime, but this isn't very clear.

2. Require either the FT_Face or FT_Library to be passed into FT_Done_MM_Var. This is somewhat like FT_Outline_Done or FT_Stroker_Done, but it seems a bit awkward.

3. Create a different sort of interface which puts the FT_MM_Var into a slot on the FT_Face. This means adding overhead to FT_Face though.

4. Create a different interface like FT_Load_Sfnt_Table, since FT_MM_Var's structure is quite similar to that of TT_HoriHeader.

Any of these seem better than the current situation. Let me know if you have a preference.

bungeman <bungeman>
Fri 30 Oct 2015 07:11:34 AM UTC, comment #1: 

Nice idea!  Can you provide a patch for an `FT_Done_MM_Var' function, together with the documentation?

BTW, I don't mind renaming `FT_Get_MM_Var' to `FT_New_MM_Var', providing an alias for the old name.  We've done that already in the past.

Werner LEMBERG <wl>
Group administrator
Thu 29 Oct 2015 08:14:37 PM UTC, original submission:  

Recently, the documentation for FT_Get_MM_Var was updated to state that the user must deallocate the returned pointer with 'free'. This is true, but I think somewhat misleading, as this 'free' is the 'free' on the FT_Library's FT_Memory. This is usually the c library 'free', but if a different FT_Free_Func was specified on the FT_Memory passed to FT_New_Library, then it should be that one which is called.

The amount of documentation this requires is a bit much. It would be nice if (like all other allocations made by FreeType) if there were a FT_Done_MM_Var. Then the documentation could just note "Use FT_Done_MM_Var to destroy the created FT_MM_Var object".

It is unfortunate that this is named 'Get' instead of 'New'.

bungeman <bungeman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by bungeman (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-08 wl StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.9
    2015-10-30 wl StatusNone Confirmed
        Assigned toNone wl

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code