-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Better <text> elements: revisited #284
Comments
The As these modifications depend on the used fonts, you get different results when changing the font.
Could you elaborate on this? The |
Thanks for your quick response.
Yes, of course. Minimal working example:
After running
Previewer: The ligature Note: To get a useable SVG file, I'm currently writing |
Thank you for the additional info. What SVG viewer do you use? It probably doesn't support SVG fonts which dvisvgm embeds by default. At least the font shown in your previewer image doesn't seem to be Exo2. Maybe you need to call dvisvgm with option |
I used Inkscape for preview.
Bingo.
Once I make use of the option One issue remains. Have a look at this part of the SVG produced with my MWE (Exo2 activated):
The line containing
Shouldn't that be:
I think this improper!? use of the unicode attribute is the root cause for the display of the unwanted glyph
Any idea why the glyph |
Great, I'm glad to hear that you could fix the issue.
Yes, that's an issue with the font file here because its Unicode character map doesn't cover all glyphs present in the font. For example, the ff ligature (glyph ID 474 in Exo 2) has a name assigned ( I'll have a look if I can add a lookup table for common glyph names, like |
Thanks for your explanation!
I can confirm that it looks correct 😄.
Great idea, that would make dvisvgm converter even better! Closing this issue, thanks or your help! |
I'm struggling with unwanted
<tspan>
elements inside in my svg files produced by dvisvgm 3.4.3. By reading the discussion in the context of #56 I got aware that a) others are affected by this deficiency, too and b) that this issue might be difficult to address. However, there may be still some room for improvement here, so let me tell my findings:Minimal working example
After running
dvilualatex mwe.tex && dvisvgm mwe.dvi
, this SVG is produced:There are no
<tspan>
elements enclosed inside the<text>
element, this is perfect.Minimal working example 2
Here I added instructions to use font
NotoSans
(line 2 + 3), the rest of the example remained unchanged:Again, I'm running
dvilualatex mwe.tex && dvisvgm mwe.dvi
to produce a SVG file. The structure of this file is very similar to the SVG file printed above, but this time, there is an unwanted<tspan>
element enclosed inside the<text>
element:My question now is: why do we have this
<tspan>
element in the second example and is there any way to avoid it?Note: I'm aware that with both produced SVG files, the text is displayed correctly. This is different from my experiences with real life situations, where the blocks formed by
<tspan>
elements do not align properly, so that the readability of the text is impaired. Manually removing the<tspan>
elements cures the problem, but having to do this with many files isn't appealing at all, that's why I'm asking here. Thanks for your investigations/clarification!The text was updated successfully, but these errors were encountered: