|Subject:||Re: [ft-devel] proposed enhancement to freetype for truetype diagnostics.|
|Date:||Wed, 10 Feb 2016 08:58:07 -0500|
An earlier version of some of this was sent to Werner privately
yesterday. I thought a bit more, and posted it as:
So this is a head-up that something will happen in that direction.
Implementing the whole 60 errors and dozen warnings from the closed source MS renderer seems daunting; so I looked into what is achievable/possible. Last summer I collected the test results of the 2003 binary against the fonts in win 8.1. The errors and warnings shown is actually a very restricted set:
3066 Instruction is only valid on the Apple platform
3555 Projection and freedom vectors at or near perpendicular
4 Instruction already defined by rasterizer
69 Not called from pre-program
885 Point out of range
22788 RP1 and RP2 have the same position on the projection vector
1243 X and Y components of vector are invalid. X^2 + Y^2 != 0x4000^2
"Instruction is only valid on the Apple platform" was determined to be bogus in previous private discussion with Werner. Out of this small list, "RP1 and RP2 have the same position on the projection vector" seems the obvious one to look at, as it is much more frequent by far, 90% of errors by instances, and also by other metrices (fonts involved, etc).
grep'ing for 'rp1' in freetype sources show that back in Feb 2013, a very localized change in Freetype was made to make it cope with such brokenness in fonts to match the MS renderer's exact behavior.
So here is a plan: at exactly the same condition, a diagnostics enhanced Freetype should abort and return an error detail, instead of silently carrying on and working around brokenness in fonts.
This goes towards implementing a test on already fairly well-behaved fonts, to make them even better - there are much more serious brokenness, I am sure, but it is a beginning to start something.
|[Prev in Thread]||Current Thread||[Next in Thread]|