freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] proposed patch for diagnostics (Re: implementing detectio


From: Behdad Esfahbod
Subject: Re: [ft-devel] proposed patch for diagnostics (Re: implementing detection of hinting/rasterization errors in fonts)
Date: Mon, 4 Jul 2016 12:43:03 -0700

The use of a global variable is not desirable.  Put it on the FT_Library at least.

On Jul 3, 2016 11:07 PM, "Hin-Tak Leung" <address@hidden> wrote:
Hi Werner,

Here is likely the final form of mod to freetype that I am putting in as part of the next release of font validator. Mostly it is just two new APIs : to set and unset an external diagnostics messaging routine, and a macro which wrap around it to call it in a nicer way: DIAGNOSTICS("message", where).

The rest is just a lot of scattered:
     "DIAGNOSTICS('message", where)",
or
     "if (simple_condition)  DIAGNOSTICS('message", where)".

If you re-define the macro to nothing, it causes no functionality change to freetype at all.

The end result is simplier than I thought, as mostly freetype already detects and silently works around the errors; so it is mostly about finding out or deciding *where* to put the DIANOSTICS().

Sorry that the "message" part is a string - it turns out to be more convenient for me to have it as a string on the freetype side, instead of having it as a enum. The set of such strings - I only use 6, but eventually there will be 70+ of them - are a subset of the ~800 enums
(those that starts with "_rast_") in

https://github.com/HinTak/Font-Validator/blob/master/OTFontFileVal/atoms.cs

Trimming (i.e. removing the "_rast_" part) or name-space prepending ("FontVal_rast_") don't add any trouble to me. So if that's more preferable?

Hin-Tak

reply via email to

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