[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] proposed patch for diagnostics (Re: implementing detection of
From: |
Hin-Tak Leung |
Subject: |
[ft-devel] proposed patch for diagnostics (Re: implementing detection of hinting/rasterization errors in fonts) |
Date: |
Mon, 4 Jul 2016 06:05:06 +0000 (UTC) |
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
freetype.diff
Description: Text Data
- [ft-devel] proposed patch for diagnostics (Re: implementing detection of hinting/rasterization errors in fonts),
Hin-Tak Leung <=