freetype
[Top][All Lists]
Advanced

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

Re: [ft] FreeType Debugging


From: Ammar ul hassan
Subject: Re: [ft] FreeType Debugging
Date: Fri, 16 Jun 2017 18:14:21 +0900

> Which platform?

I am using Unix.

> On Unix-like systems, tracing and error messages are
sent to stderr

I tried to compile the Freetype by putting some messages through fprintf
like putting this fprintf( stderr, "File cannot be opened \n" ); under some
obvious code which always runs, but i couldn't see the output on screen.

One thing to make the picture clear to you my application which prints any
type1 or truetype styled font on screen uses Xft to show output. I dont
directly include any Freetype header as i assume that Xft/fontconfig passes
the font patterns to FreeType as mentioned in the there documentation. So
if a type1 font matching pattern is passed i assume that type1 driver is
called when truetype parsing is failed. In Type1 driver where it is
checking the header formats iam trying to print some messages on terminal
using stderr (like opening a file which doesn't exists and than check if
file pointer is null than print error message). Is this testing
mechanism right in your view ?

Is there any direct test program which i can use to test type1 font driver
and print my error messages on terminal?

On Thu, Jun 15, 2017 at 3:09 PM, Werner LEMBERG <address@hidden> wrote:

>
> > 1) I am trying to debug the Type1 driver by printing some error
> >    messages using FT_ERROR MACRO. I have defined both #define
> >    FT_DEBUG_LEVEL_ERROR, #define FT_DEBUG_LEVEL_TRACE MACROS in
> >    ftoption.h to use FT_ERROR.
>
> OK.
>
> > For testing i have created a client application which takes the name
> > of type1 font and prints the text on screen by applying that font
> > style (which means that type1 driver will be invoked ).  But its not
> > printing any message, but application is working perfectly using
> > FreeType.
>
> Which platform?  On Unix-like systems, tracing and error messages are
> sent to stderr.  On Windows, GUI applications can't emit data to
> stderr, AFAIK.  You should rather use `builds/windows/ftdebug.c'.
>
> > 2) I tried another way for debugging by writing to an external text
> >    file the same text message after the same line of code but it
> >    didn't work.  So is it possible to create and write to external
> >    files i.e. outside FreeType?
>
> By default, FreeType doesn't have support for such a feature.  In most
> cases it is fully sufficient to redirect stderr to a file.  On the
> other hand you can certainly replace the `ftdebug.c' component with
> something else.
>
>
>     Werner
>


reply via email to

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