[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help compiling freetype with debug output enabled
From: |
Werner LEMBERG |
Subject: |
Re: Need help compiling freetype with debug output enabled |
Date: |
Sun, 21 May 2023 04:20:43 +0000 (UTC) |
> I am trying to look at the trace output using the FT_Trace_Set_Level
> function. I read that FT_DEBUG_LOGGING macro must be set for this
> to work, so I tried doing this by passing:
> -Dc_args='-D FT_DEBUG_LOGGING'
> to meson setup.
Alas, support for `FT_DEBUG_LOGGING` is not implemented in Meson. You
are very welcome to submit a Merge Request that adds it :-)
However, tracing works just fine without the `dlg` library by using
the `FT2_DEBUG` environment variable and redirecting stderr (and
stdin) to a file.
> What is the correct way to enable trace output?
I assume that you want to compile both the demo and the library.
(1) Change to the 'freetype-demos' git repository.
(2) Say `meson subprojects update`.
(3) Go to directory `subprojects/freetype2/include/freetype/config`
and modify file `ftoption.h`; you need to comment out options
`FT_DEBUG_LEVEL_ERROR` and `FT_DEBUG_LEVEL_TRACE`.
(4) At top level, say `meson setup builddir`.
(5) Say `meson compile -C builddir`.
You can now try, say,
```
FT2_DEBUG=any:7 ftview foo.ttf &> foo.log
```
to check whether you actually get debugging output in `foo.log`.
Werner