bugThe FreeType Project - Bugs: bug #39383, Performance of tt_face_get_metrics


bug #39383: Performance of tt_face_get_metrics

Submitted by:  None
Submitted on:  Mon 01 Jul 2013 09:59:44 AM UTC  
Severity:  3 - Normal Item Group:  Hack required
Status:  None Privacy:  Public
Assigned to:  Werner LEMBERG <wl> Open/Closed:  Open
Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 03 Jul 2013 10:03:53 PM UTC, comment #2: 

Er... there are only 4MB RAM in total (about 3MB available for app, I think), even less than the size of a typical CJK ttf file, so it's impossible.

Tue 02 Jul 2013 08:46:50 AM UTC, comment #1: 

I've fixed the documentation of tt_face_get_metrics, thanks for the report.

Regarding the delay: What about loading the whole font into an array so that there is no I/O penalty at all?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 01 Jul 2013 09:59:44 AM UTC, original submission:  

I found there is a significant longer(about 5x) delay rendering ttf on my NDS homebrew program after switched from freetype-2.4.11.

There are only a few lines in my ftmodule.h:
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )

Then I found it is tt_face_get_metrics in ttmtx.c: when using the 2.4.11 revision with FT_CONFIG_OPTION_OLD_INTERNALS defined, everything seems to be OK.
This is probably due to the I/O penalty of the file system which some devices can't afford. Though saving memory is often good, it seems better to allow user to decide whether it should be used here.
Btw, doc for this function (from TT_Get_Metrics a decade ago) is broken ...



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

Attach Files:

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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-02 wl Assigned toNone => wl

    Back to the top

    Powered by Savane 3.5