|
From: | suzuki toshiya |
Subject: | Re: [ft-devel] PDF text rendering error |
Date: | Thu, 14 Jun 2012 01:18:43 +0900 |
User-agent: | Mozilla-Thunderbird 2.0.0.12 (X11/20080406) |
now, what i need to modify?
I wonder what your purpose is, and what you're doing now. Your goal is the bugfix of the application on Windows? If so, why don't you make the sample program on Windows? Or, your goal is the bugfix of the application on GNU/Linux? If so, why you mention about MSVC? FreeType2 already have demo program showing the rasterization results on X11 (e.g. ftview), and no need to write a program. Regards, mpsuzuki Johnson Y. Yan wrote:
Toshiya-san, Sorry! I copy the source code from the linux environment(ubuntu) to windows',then sent to you. now, what i need to modify? or, i render error, you are still right? Johnson Y. Yan 发件人: suzuki toshiya 发送时间: 2012-06-13 23:09:11 收件人: Johnson Y. Yan 抄送: freetype-devel 主题: Re: [ft-devel] PDF text rendering error I attached the TTF in your sample PDF, and attached PNG is my rasterization result. I think it's OK. Regards, mpsuzuki -- Your sample was not compilable. The compiler in MS Visual Studio 2008 complains like this. Compiling... freetypetest.c c:\users\mps_jp\documents\2012_06\freetypetest.c(13) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(237) : see declaration of 'fopen' c:\users\mps_jp\documents\2012_06\freetypetest.c(16) : error C2065: 'buffer' : undeclared identifier c:\users\mps_jp\documents\2012_06\freetypetest.c(16) : warning C4022: 'memset' : pointer mismatch for actual parameter 1 c:\users\mps_jp\documents\2012_06\freetypetest.c(18) : error C2065: 'buffer' : undeclared identifier c:\users\mps_jp\documents\2012_06\freetypetest.c(18) : error C2109: subscript requires array or pointer type c:\users\mps_jp\documents\2012_06\freetypetest.c(19) : error C2065: 'buffer' : undeclared identifier c:\users\mps_jp\documents\2012_06\freetypetest.c(19) : error C2109: subscript requires array or pointer type c:\users\mps_jp\documents\2012_06\freetypetest.c(19) : error C2065: 'size' : undeclared identifier [snip] It is the fundamental error, your source includes following part. // Calculate file size int size = 14 + 40 + pitch*height; unsigned char buffer[40]; memset(buffer, 0, 40); The declaration of the "size" and "buffer" are commented out. Maybe you copy/paste the source code from somewhere and injected some manual error. Similar errors are found in several parts. Also seeing the part likeint main(int argc, char** argv){ if (argc == 1) {printf("Usage: gcctest <path> [<start page #>] [<page count>].\n"); return 0; } makes me feel sad. Johnson Y. Yan wrote:When i set patch = 12061, it displays "FreeType2 version 2.4.12061" and not set patch, it displays "FreeType2 version 2.4.9" Johnson Y. Yan 发件人: suzuki toshiya 发送时间: 2012-06-13 17:51:14 收件人: Johnson Y. Yan 抄送: freetype-devel 主题: Re: [ft-devel] PDF text rendering error Just I've updated the patch making FT_Library_Version() return the irregular values. Please invoke FT_Library_Version() and print its result to stdout or stderr, to assure that your binary is linked with the patched library. Insertion something like { FT_Int maj, min, pat; FT_Library_Version( library, &maj, &min, &pat); fprintf( stderr, "FreeType2 version %d:%d:%d\n", maj, min, pat ); } will give "FreeType2 version 2.4.12061". Regards, mpsuzuki suzuki toshiya wrote:Johnson Y. Yan wrote:*sure* that you are linking to the right, patched FreeType library? -------see the render (gid = 2134) result saved as png image.I think what Werner asked is "could you check if your binary is linked with the patched library, not with the unpatched libary?". Unfortunately, "yes, I've checked" is NOT objective answer. The solution would be... hmm, I will update the patch that changes the version returned by FT_Library_Version() function. So please update your testing program to invoke the function and show the version. Regards, mpsuzuki P.S.Are you really writing code without indentation? -------It depends on freetype,I don't think FreeType2 requests you to write a code without indentation. I'm interested in if it is a inhouse convention of the engineers in Foxit Software. Johnson Y. Yan wrote:Werner , Are you really writing code without indentation? -------It depends on freetype, Any reason why you don't use the symbolic value, FT_LOAD_NO_BITMAP? -------FT_LOAD_NO_BITMAP == 8 *sure* that you are linking to the right, patched FreeType library? -------see the render (gid = 2134) result saved as png image.I think the important thing is that it calls freetype's interface, and there is a result.Thanks. Johnson Y. Yan 发件人: Werner LEMBERG 发送时间: 2012-06-13 16:25:34 收件人: yinsen_yan 抄送: mpsuzuki; freetype-devel 主题: Re: [ft-devel] PDF text rendering error ... Are you really writing code without indentation?#include "../../ft2.4.9/include/freetype/internal/ftobjs.h"Uh, oh! You must never, ever use an internal header file in your source code (except for special reasons).int load_flags = 8;Any reason why you don't use the symbolic value, FT_LOAD_NO_BITMAP? Besides this, I don't see a problem with your code (after a quick look). Are you *sure* that you are linking to the right, patched FreeType library? Werner_______________________________________________ Freetype-devel mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/freetype-devel
[Prev in Thread] | Current Thread | [Next in Thread] |