freetype
[Top][All Lists]
Advanced

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

Re: [freetype] Re-2: [ft] Different Values from Freetype Face


From: mpsuzuki
Subject: Re: [freetype] Re-2: [ft] Different Values from Freetype Face
Date: Fri, 29 Jan 2010 23:34:25 +0900

Dear Andreas,

Just I've committed 2-a patch to GIT HEAD,
2-a) is a first step to 2-b).

If I modify ftdump.c by following patch,
ftdump's result restores the output before
Kornfeld's patch enabling preferred family
names by default.

Werner, Andreas kindly noticed that his
request is not urgent, so you can revert
my patch if you find any problem.

Regards,
mpsuzuki


diff --git a/src/ftdump.c b/src/ftdump.c
index 840af91..46065c8 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -664,7 +664,24 @@
 
     for ( i = 0; i < num_faces; i++ )
     {
+#ifdef IGNORE_PREFERRED_NAMES
+      FT_Open_Args   args;
+      FT_Parameter   ft_param[2];
+
+
+      args.flags       = FT_OPEN_PATHNAME;
+      args.pathname    = filename;
+      args.flags      |= FT_OPEN_PARAMS;
+
+      args.num_params  = sizeof( ft_param ) / sizeof( FT_Parameter );
+      ft_param[0].tag  = FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY;
+      ft_param[1].tag  = FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY;
+      args.params      = ft_param;
+
+      error = FT_Open_Face( library, &args, i, &face );
+#else
       error = FT_New_Face( library, filename, i, &face );
+#endif
       if ( error )
         PanicZ( "Could not open face." );
 


On Thu, 28 Jan 2010 12:35:40 +0000
"Andreas Heinrich" <address@hidden> wrote:

>Hello,
> 
>2-a would be appreciated for me, too.
> 
>the add-on isn't urgent for me at the moment, so that is no problem for me 
>when the 
>changes will be integrated after next official release.
> 
>Regards, 
>Andreas
 
>>Dear Werner,
>>
>>Yesterday I got a comment from Andreas Heinrich (the
>>original reporter of this issue), he preferred 2),
>>especially 2-b). Still I feel small hesitate to modify
>>FT_Library object without a comment from Turner, so
>>I will commit 2-a) for first (within 36 hours, I hope),
>>and commit 2-b) after next official release, freetype-2.3.12.
>>I want to avoid a pity that new function is introduced
>>in 2.3.12 and removed in 2.3.13.
>>
>>On Sat, 16 Jan 2010 06:51:19 +0100 (CET)
>>Werner LEMBERG wrote:
>>>> 2-b) Add the switch to FT_Library handle, to hide the default
>>>> parameters in the font handle creation. It can change the
>>>> behaviour of popular APIs like FT_New_Face() taking no
>>>> optional parameters.
>>>
>>>> The default parameters can be changed by
>>>> FT_SetDefaultNewFaceParam_FreeType().
>>>
>>>Can you find a better, shorter function name? Something like
>>>`FT_Set_Open_Args_Defaults'...
>>
>>Thank you for reasonable comment. For future compatibility,
>>generic name would be better.
>>
>>In fact, after writing the patch proposing 2-b), I found
>>another case that I want to hold something in FT_Library.
>>I will post another discussion about it. It is not for
>>2.3.12 release.




reply via email to

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