freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Minimal TTF implementation


From: Wojciech Mamrak
Subject: Re: [ft] Minimal TTF implementation
Date: Fri, 16 Aug 2013 21:39:30 +0200

small naive comparison.

compiler msvc10, win 7, ft2501, release configuration; only TTF,
subpixel rendering enabled;
decrease in size (kB) between configurations 1) and 2) is for few of
my projects equal to 254kB.

configuration 1):
 - vanilla ft except that FT_CONFIG_OPTION_SUBPIXEL_RENDERING is enabled

configuration 2):
 - list of ALL enabled modules:
    autofit_module_class, tt_driver_class, ft_raster1_renderer_class,
sfnt_module_class, ft_smooth_renderer_class,
ft_smooth_lcd_renderer_class
 - options:
    see attached file; I used "//" comments.

regards

2013/8/16 suzuki toshiya <address@hidden>:
> And, it is possible to reduce the number of the supported cmap
> format by editing ftoption.h.
>
> BTW, I want to know the expected size. Sometimes I see similar
> question asking for smaller library, but I seldom see the result
> reporting "finally I could fit to the expected size, by doing such".
>
> Regards,
> mpsuzuki
>
>
> On 08/17/2013 01:18 AM, Wojciech Mamrak wrote:
>>
>> why not to go even further? :)
>>
>> //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
>> //FT_USE_MODULE( FT_Module_Class, psaux_module_class )
>> //FT_USE_MODULE( FT_Module_Class, psnames_module_class )
>> //theoretically needed, but seems to work well without it
>> //FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
>> //FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
>> //FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
>>
>> 2013/8/16 Iñaki Castillo Arteta <address@hidden>:
>>>
>>> I have removed the following modules(see below), and now the compiled
>>> library is 285KB, instead of 320KB.
>>> It is 35KB less. Not bad, but not as much as I would expect considering I
>>> have dropped support for a lot of font types.
>>> I understand TTF support may take the most part of the library, but is it
>>> possible to reduce it even further?.
>>>
>>> By the way, how can I remove selectively the support for OTF fonts ?
>>>
>>> //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
>>> //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
>>>
>>> -----Mensaje original-----
>>> De: address@hidden [mailto:address@hidden En nombre de
>>> Wojciech Mamrak
>>> Enviado el: viernes, 16 de agosto de 2013 16:53
>>> Para: Iñaki Castillo Arteta
>>> CC: address@hidden
>>> Asunto: Re: [ft] Minimal TTF implementation
>>>
>>> Also I've been successful with disabling optional (yet theoretically
>>> needed by truetype module) psnames module (without any modifications in
>>> ftoption.h).
>>>
>>> I would be also interested whether it is possible to decrease
>>> executable's size even more.
>>>
>>> 2013/8/16 Wojciech Mamrak <address@hidden>:
>>>>
>>>> See files docs/CUSTOMIZE, docs/INSTALL.ANY and modules.cfg.
>>>>
>>>>
>>>>
>>>> 2013/8/16 Iñaki Castillo Arteta <address@hidden>:
>>>>>
>>>>> Hi.
>>>>>
>>>>> Which is the minimal footprint I should expect for a Freetype
>>>>> implementation that manages only TTF fonts ?
>>>>>
>>>>> Currently my implementation takes 320KB which is compiled with,
>>>>> almost, all default settings (except Mac font support).
>>>>>
>>>>> I would like to reduce the library as much as possible in size, while
>>>>> preserving  TTF rendering (with antialiasing and subpixel).
>>>>>
>>>>> Is there an example about how to customize compilation settings to
>>>>> achieve something like this ?
>>>>>
>>>>>
>>>>>
>>>>> Regards.
>>>>>
>>>>> Inaki.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Freetype mailing list
>>>>> address@hidden
>>>>> https://lists.nongnu.org/mailman/listinfo/freetype
>>>>>
>>
>> _______________________________________________
>> Freetype mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/freetype
>>
>

Attachment: ftoption.h
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]