Open dhowe opened 6 years ago
I don't object to people providing it, but at the moment I don't have the time nor facility to do so.
FWIW, google fontbakery provides online checking with a somewhat crippled derivative.
@prepare seems to be working on something like that on one of his branches.
Hm, the only thing that fontval would need to be able to do is report out to stdio from the command line, so that we (e.g. anyone that needs it) can integrate fontval into whatever langauge we want through a spawn/exec call with stdio/stderr capture.
Could a CLI flag be added to FontValidator.exe so that rather than write the result to an XML file, it just pipes the XML straight to stdio, @HinTak? (say, fontval -file singlefont.otf -stdio
). I know there's a -report-stdout
already, but that outputs more than purely the data report, and pipes it in a non-uniform data format (so you can't just take that output and read it in with a utility that consumes delimited data, for instance)
Writing a web service that uses fontvalidator then basically becomes trivial.
The -stdout
option has been around for a few years now :-), though it transforms the xml to plain text first...
It is not too hard to add a -report-to-stdout
, just need a different name. Also there used to be a problem with the freestype backend using static variables so not safe to run two instances in same process, but fixed this year.
What @prepare does seems more interesting.
It does more than that, thought. Running -report-to-stdout
/-stdout
also pipes out strings that are not related to the report, such as the very first line, and adds in additional lines for table names that mean the output cannot be parsed by other utils that use standard parsers, without customizing them specifically to what FontValidator happens to output today. Adding a flag that turns off the "anything except the report data" and forces the output to just be the XML that currently gets written to file, so that any tool that understands XML can read the data in, without even needing to know what the source was, would be great (like FontValidator -stdout -xml ......
or something)
As for whether @prepare's work is more interesting: no need to pick one or the other if adding the flag is easy to do. Having that flag will allow other people to imagine cool things to do that having a full service available doesn't allow for =)
I mean -stdout
is unfortunately already used to mean something else, but doing what you ask for (with a slight different named switch) isn't hard. Yes, calling it -xml-stdout
is fairly reasonable.
What I suspect the original reporter is asking for, is a 24/7 hosted service though (more like the Fontbakery Web site) , which @prepare seems to be heading towards...
ohh, gotcha. totally misread that.
which calls the validator on the server-side