[ft-devel] rendering differences between OS X and Win32
I'm try to write a cross platform application and I'd like there to be uniform behaviour when it comes to rendering fonts. Unfortunately I ran into a bug and just to make sure that there wasn't a problem with my code I wrote a short test program to highlight the bug. Here's a list of the program and the output for both OS X and Win32. program: #include stdio.h #include ft2build.h #include FT_FREETYPE_H int main(void) { FT_Library library; FT_Init_FreeType(library); FT_Face face; FT_New_Face(library, arial.ttf, 0, face); FT_Set_Char_Size(face, 0, (18 6), 72, 72); unsigned i; for (i = 65; i 90; i++) { FT_Load_Char(face, i, FT_LOAD_RENDER | FT_LOAD_NO_AUTOHINT); FT_GlyphSlot glyph = face-glyph; printf(rows: %d width: %d\n, glyph-bitmap.rows, glyph-bitmap.width); } return 0; } OS X output: rows: 13 width: 14 rows: 13 width: 11 rows: 15 width: 13 rows: 13 width: 12 rows: 13 width: 11 rows: 13 width: 10 rows: 15 width: 13 rows: 13 width: 11 rows: 13 width: 3 rows: 14 width: 8 rows: 13 width: 11 rows: 13 width: 9 ... Win32 output: rows: 13 width: 13 rows: 13 width: 10 rows: 13 width: 11 rows: 13 width: 11 rows: 13 width: 10 rows: 13 width: 9 rows: 13 width: 12 rows: 13 width: 11 rows: 13 width: 2 rows: 13 width: 8 rows: 13 width: 11 rows: 13 width: 8 ... One would think that the output would be identical, but it's not. Also, there doesn't seem to be a pattern either. Sometimes the Win32 output is differs in rows or width or both. Is there something obvious that I'm not doing or this a bug that other people have come across? Kevin ___ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] rendering differences between OS X and Win32
On 12/26/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, On Mon, 26 Dec 2005 03:29:22 -0700 Kevin Barabash [EMAIL PROTECTED] wrote: I'm try to write a cross platform application and I'd like there to be uniform behaviour when it comes to rendering fonts. Unfortunately I ran into a bug and just to make sure that there wasn't a problem with my code I wrote a short test program to highlight the bug. Here's a list of the program and the output for both OS X and Win32. I'm interested in the bug you reported, but I don't have enough time to track indepth mechanism. Give me 2 weeks before join to discussion... BTW, the font file arial.ttf is same? It is taken from MSIE fonts? If you see similar bug in various fonts, please let me know - we can test on other platforms too. I thought for some reason, freetype might be accessing a system copy of the font so I removed the font file from the directory on each platform and of course the program crash. The font file arial.ttf is the same. The specific file is taken from Microsoft's core font collection: http://corefonts.sourceforge.net/ Kevin ___ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel
Re: [ft-devel] rendering differences between OS X and Win32
Problem solved. I replaced the official binary libraries with mingw compiled libraries I found at http://oss.netfarm.it/mplayer-win32.php which was a lot easier than compiling freetype myself because I'm using VPC and it's slow. I'm guessing that maybe the official binary was compiled with MSVC and some it's behaviour is a little different than gcc. Hmm, inspite of using different compilers the behaviour should be completely identical, since FreeType doesn't use floating point arithmetic. Can you further investigate? Werner ___ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel