-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for viewing validation results on Linux with Firefox #69
base: master
Are you sure you want to change the base?
Conversation
Firefox did display HTML tags instead of interpreting them; with the changes applied to FontVal/fval.xsl, HTML is parsed correctly.
Firefox does not know document.all.tags() used in display_row(), so replace with standard document.body.querySelectorAll(), thereby simplifying the selection of rows.
display_table() did unconditionally toggle the visibility of the given table; now pass the actual value of the corresponding checkbox, and set visibility accordingly. Update corresponding onclick events, accordingly.
Did you check https://github.com/HinTak/Font-Validator? We did some xsl related work very early on... |
No, I did not, because I don't know which is the "right" repository ;-) |
The xsl is not used at all in mine - it is emitted from memory when needed, due to Linux/mac usage. Try running the binary and see the xsl deposited next to the report. |
This repo is unmaintained and not updated in a long time. Please use
hintaks!
|
I checked mine with Firefox 64 and it works fine. The problem you saw is rather a problem of the old microsoft code again Firefox's rendering model. Firefox cannot re-interprete literal <> generated by xsl transformation as xml objects... In fact only MSIE seems to do so. Hence at the very beginning of my fork an additional html output file is auto-generated for non-windows. I.e. : if you are on windows, use the built-in IE based viewer. If you are on non-windows, there should be an additional html report, view that with Firefox instead of viewing the xml. If you are on windows and wants to use Firefox, that's the situation my fork does not cater for. |
Also as a general policy, I don't/won't t take changes that makes fontval works better on Linux/mac, at the risk/sacrifice of making it worse on windows. Your changes, in principle, affect rendering with MS IE too. (although I am reasonably sure it does not in actuality - but who knows given the unknowns with MSIE?) I am not a big Microsoft fan, but just don't want to have regressions and code-churns (I.e. breaking one platform to accommodate another, then go in the opposite directions). |
Well, I don't care: I made these chenges to make the output readable on Linux, and while doind so I found some fun fixing all the problems I found. At the end I thought I'll share my work. There's no obligation for you to use it, of course. |
Give 2.1.4 from It looks as if you might be running the GUI? On Linux the built-in report viewer in the GUI was fully functional about a year or so ago, with webkit (webkit1). Whether it stills work or not, depends. Fedora has completely deprecated webkit1, and went fully webkit2 in fedora 29. |
Running Font-Validator on Linux creates some XML (like
/tmp/tmp7e1c5047.tmp.report.xml
) with XSL (fval.xsl
). However when viewing the XML in Firefox 60, several HTML tags are being displayed instead of being interpreted.While having almost no idea about XSL rules, and very little about Javascript (Firefox does not know
document.all.tags()
used indisplay_row()
), I started to fix things be deducing patterns and asking "Dr. Google". So I fixedFontVal/fval.xsl
andbin/fval.xsl
(while not understanding why there are two different ones).I also fixed a bug where display_table() did unconditionally toggle the visibility of the given table.
It's three commits, maybe you like them.