-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unwanted horizontal spacing in the diplomatic transcriptions #22
Comments
It looks like the boxes (for, e.g., |
Those cases that I could identify were consequences of invalid web font definitions in the generation pages, leading to different fonts (with different metrics) being used for calculating the boxes in the SVGs and actually rendering the text snippets in the users' browsers. I believe to have fixed this in |
Hm, when I look at |
Current version of the rendering uses the same CSS for both rendering (cf. the 🐛 icon in the document viewer) and display, and there are still spacing issues. Current hypothesis is that the SVG content is scaled somewhere in the rendered page, this would also explain the unwanted vertical space. |
Here is an example excerpt from 2 H S. 224. (1) SVG as generated using PhantomJS: <g class="text-wrapper" transform="matrix(1 0 0 1 0 0)">
<rect class="bgBox hand-st material-t normal" height="23" width="336" x="0" y="-18"/>
<text class="text hand-st material-t normal">Du kriegerzeugte, ſchlachterzogne, junge Brut</text>
</g> (2) Debug HTML as generated using PhantomJS: <g class="text-wrapper" transform="matrix(1 0 0 1 0 0)">
<rect class="bgBox hand-st material-t normal" height="23" width="336" x="0" y="-18"></rect>
<text class="text hand-st material-t normal">Du kriegerzeugte, ſchlachterzogne, junge Brut</text>
</g> (3) The SVG from 1 copied into the documentViewer: <g class="text-wrapper" transform="matrix(1 0 0 1 0 0)">
<rect class="bgBox hand-st material-t normal" height="23" width="336" x="0" y="-18"></rect>
<text class="text hand-st material-t normal" style="pointer-events: none;">Du kriegerzeugte, ſchlachterzogne, junge Brut</text>
</g> (4) The excerpt as rendered in Firefox from debug.html: <g class="text-wrapper" transform="matrix(1, 0, 0, 1, 0, 0)">
<rect class="bgBox hand-st material-t normal" height="16.433332443237305" width="307.70001220703125" x="0" y="-13.600000381469727"></rect>
<text class="text hand-st material-t normal">Du kriegerzeugte, ſchlachterzogne, junge Brut</text>
</g> The XML samples have all been copied from the respective files (1+2) or from Firefox' debug window (3+4), and the XML has been canonicalized and indented in order to be comparable. As can be seen, the stuff rendered by PhantomJS is never modified; it is just rendered with different, more appropriate coordinates in Firefox. This may be the DPI issue 2.x versions of PhantomJS face (that are announced to be solved in 2.2), or it may be a general problem. Maybe try SlimerJS to confirm; and decide whether we can just wait for a fixed PhantomJS or switch to SlimerJS or whether we need to calibrate the generated SVGs to the users' browsers. |
The problem still exists with SlimerJS (faustedition/faust-gen#13) 😠 so it's probably an inclusion thing, not a rendering issue. Cf., e.g., Clytemneſten here and compare with the version rendered in the current browser. |
It is not an inclusion thing:
So the basic problem is that the rendering process renders correctly when run from an interactive browser, but wrong when run from SlimerJS or PhantomJS. But why‽ |
On my system with OS X 10.10.5 with PhantomJS 1.9.1, it renders correctly. The above example gives this, which has no visible gap when viewed in the browser <g xmlns="http://www.w3.org/2000/svg" class="text-wrapper" transform="matrix(1 0 0 1 0 0)">
<rect class="bgBox hand-st material-t normal" x="0" y="-14" height="17" width="313"/>
<text class="text hand-st material-t normal">Du kriegerzeugte, ſchlachterzogne, junge Brut</text>
</g> I'll see if I can test it with SlimerJS on OS X. |
In SlimerJS (with Firefox 38) on OS X the problem persists. Even when I view it with the same Firefox installation that is used by SlimerJS for rendering. |
I think this issue belongs to |
Re PhantomJS 1.9.x: Problem was that it doesn't support webfonts, at least on linux. I'm re-testing it, but at least the PDFs contain just plain vanilla default sans-serif fonts instead. There is a PhantomJS 2.5.0-beta, I'll test that as well, maybe our problems magically go away … |
DUPLICATE of faustedition/faust-gen#13
See
http://beta.faustedition.net/documentViewer.php?faustUri=faust://xml/document/faust/2.3/gsa_391347.xml&page=5&view=document
in comparison to
https://faustedition.uni-wuerzburg.de/new/document/faust/2.3/gsa_391347.xml#/5
In particular:
The text was updated successfully, but these errors were encountered: