freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] new CFF engine


From: octoploid
Subject: Re: [ft-devel] new CFF engine
Date: Fri, 03 May 2013 16:40:58 +0200


03.05.2013, 16:23, "Werner LEMBERG" <address@hidden>:
>>  I've build freetype2 and freetype2-demos with clang's
>>  -fsanitize=undefined. Here's what I get when run ftview on an otf
>>  font:
>>
>>    ttcmap.c:908:18: runtime error: left shift of negative value -1
>>    [...]
>
> Thanks.  clang is *very* picky :-) Virtually all compilers do the
> right thing for left shifting negative values in case the result fits
> into the data type...
>
> May I ask you to apply the attached patch and re-run the test?  It
> should remove the errors in cffgload.c; I'll try to fix the other
> errors in due course, after getting your confirmation that I'm doing
> the right thing.

Thanks. Yes, the cffgload.c errors are gone now.

BTW the following hack:

diff --git a/src/cff/cf2types.h b/src/cff/cf2types.h
index ac6a022..5f09ce0 100644
--- a/src/cff/cf2types.h
+++ b/src/cff/cf2types.h
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
 
 
   /* fixed-float numbers */
-  typedef FT_Int32  CF2_F16Dot16;
+  typedef long  CF2_F16Dot16;
 
 
 FT_END_HEADER

Makes the "wavy lines" problem go away here, but unfortunately
all glyphs with descenders are not rendered anymore... 



reply via email to

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