freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] improved tracing support


From: Werner LEMBERG
Subject: [ft-devel] improved tracing support
Date: Thu, 16 Aug 2018 18:03:15 +0200 (CEST)

Folks,


I would like to convert FreeType tracing data like

  FT_Open_Face: Requesting number of faces and named instances
  FT_Stream_Open: opened `arial.ttf' (273020 bytes) successfully
  TTF driver
    SFNT driver
  sfnt_open_font: synthesize TTC
  sfnt_init_face: 0x105a9d0 (index -1)
  tt_face_load_font_dir: 0x105a9d0
  -- Number of tables:         23
  -- Format version:   0x00010000
  ...

to

  objs:3:     FT_Open_Face: Requesting number of faces and named instances
  io:1:       FT_Stream_Open: opened `arial.ttf' (273020 bytes) successfully
  ttobjs:2:   TTF driver
  sfobjs:2:     SFNT driver
  sfobjs:3:   sfnt_open_font: synthesize TTC
  sfobjs:2:   sfnt_init_face: 0x20aa9d0 (index -1)
  ttload:2:   tt_face_load_font_dir: 0x20aa9d0
  ttload:2:   -- Number of tables:         23
  ttload:2:   -- Format version:   0x00010000
  ...

In other words, the log file will show the tracing component and the
level.  This should make it simpler to find the right components for
`FT2_DEBUG'.  It will also help to fine-tune the tracing levels to get
more meaningful output if the level is set to a lower value.  The
disadvantage is that 12 characters get added to each line as prefix,
making the tracing longer.

What do you think?  IMHO, the benefit is much large than the increased
size.

To implement that, I would use variadic macro support introduced to
the C99 preprocessor – in case this is not available, the tracing will
look as of today.


    Werner

reply via email to

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