* SVG comments, transparency, and extended font styles
@ 2021-04-03 18:10 Thangalin
2021-04-03 18:25 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Thangalin @ 2021-04-03 18:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1615 bytes --]
Issues encountered with version 2021.03.31 18:04.
1. Comments in SVG
% SOF
\startbuffer[svg]
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- Hello --><g><circle cx="50" cy="50" r="20"/></g></svg>
\stopbuffer
\starttext
\placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext
% EOF
Expected: Black circle, no border, comment lines ignored.
Actual: Empty square.
2. Transparent stroke
% SOF
\startbuffer[svg]
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<polygon fill="#eeffff" stroke="transparent" points="500,10 500,0 0,0 0,10"
/>
</svg>
\stopbuffer
\starttext
\placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext
% EOF
Expected: Light cyan rectangle, no border (it's transparent).
Actual: Light cyan rectangle with visible border.
3. Inkscape font specification
We discussed this previously: Inkscape extends the SVG specification with a
custom style class ("-inkscape-font-specification") that allows its users
to refine font styles.
% SOF
\startbuffer[svg]
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 154.6 19.3"
width="155" height="19"><text x="-6.7" y="-2.3"><tspan x="-1.9" y="15"
style="-inkscape-font-specification:'Roboto,
Ultra-Light';font-family:Roboto;font-size:20px;font-weight:200">Roboto
Ultra-Light</tspan></text></svg>
\stopbuffer
\starttext
\placefigure{}{\includesvgbuffer[svg][conversion=mp]}
\stoptext
% EOF
Expected: "Roboto Ultra-Light" appears in Roboto Ultra-Light font.
Actual: Empty square.
Supporting this via MetaPost would help maintain backwards compatibility
(with ConTeXt invoking Inkscape).
Thank you!
[-- Attachment #1.2: Type: text/html, Size: 2509 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SVG comments, transparency, and extended font styles
2021-04-03 18:10 SVG comments, transparency, and extended font styles Thangalin
@ 2021-04-03 18:25 ` Hans Hagen
2021-04-03 19:46 ` Thangalin
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2021-04-03 18:25 UTC (permalink / raw)
To: mailing list for ConTeXt users, Thangalin
On 4/3/2021 8:10 PM, Thangalin wrote:
> Issues encountered with version 2021.03.31 18:04.
>
> 1. Comments in SVG
>
> % SOF
> \startbuffer[svg]
> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg
> <http://www.w3.org/2000/svg>">
> <!-- Hello --><g><circle cx="50" cy="50" r="20"/></g></svg>
> \stopbuffer
>
> \starttext
> \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
> % EOF
>
> Expected: Black circle, no border, comment lines ignored.
> Actual: Empty square.
>
> 2. Transparent stroke
>
> % SOF
> \startbuffer[svg]
> <svg xmlns="http://www.w3.org/2000/svg <http://www.w3.org/2000/svg>"
> version="1.1">
> <polygon fill="#eeffff" stroke="transparent" points="500,10 500,0 0,0
> 0,10" />
> </svg>
> \stopbuffer
>
> \starttext
> \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
> % EOF
>
> Expected: Light cyan rectangle, no border (it's transparent).
> Actual: Light cyan rectangle with visible border.
i'll check it .. if I forget, remind me.
> 3. Inkscape font specification
>
> We discussed this previously: Inkscape extends the SVG specification
> with a custom style class ("-inkscape-font-specification") that allows
> its users to refine font styles.
>
> % SOF
> \startbuffer[svg]
> <svg xmlns="http://www.w3.org/2000/svg <http://www.w3.org/2000/svg>"
> viewBox="0 0 154.6 19.3" width="155" height="19"><text x="-6.7"
> y="-2.3"><tspan x="-1.9" y="15"
> style="-inkscape-font-specification:'Roboto,
> Ultra-Light';font-family:Roboto;font-size:20px;font-weight:200">Roboto
> Ultra-Light</tspan></text></svg>
> \stopbuffer
>
> \starttext
> \placefigure{}{\includesvgbuffer[svg][conversion=mp]}
> \stoptext
> % EOF
>
> Expected: "Roboto Ultra-Light" appears in Roboto Ultra-Light font.
> Actual: Empty square.
>
> Supporting this via MetaPost would help maintain backwards compatibility
> (with ConTeXt invoking Inkscape).
Hm, one should export the 'simple' SVG from inkscape, not the bloated
stuff. This is a bit like Adobe illustrator and its AI files: tons of
crap needed for an editor but not really an 'eps' file for which there
is a normal export. Once we decide to support all the weirdness there is
no end. It's like the browser css madness.
Now, with regards to remapping fonts, doing that at the tex end should
work ok (maybe some extra helper for svg to make it easier).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SVG comments, transparency, and extended font styles
2021-04-03 18:25 ` Hans Hagen
@ 2021-04-03 19:46 ` Thangalin
2021-04-03 21:15 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Thangalin @ 2021-04-03 19:46 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 468 bytes --]
A bug report exists for the -inkscape-font-specification issue:
https://bugs.launchpad.net/inkscape/+bug/1324809
I've migrated it, so hopefully it'll get some traction:
https://gitlab.com/inkscape/inbox/-/issues/4704
It'd be nice to support that particular extension; however, the reason for
not supporting it is sound. It sucks because end users don't care about
such technical minutiae and can't readily unravel such font discrepancy
issues when encountered.
TX
[-- Attachment #1.2: Type: text/html, Size: 775 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SVG comments, transparency, and extended font styles
2021-04-03 19:46 ` Thangalin
@ 2021-04-03 21:15 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2021-04-03 21:15 UTC (permalink / raw)
To: Thangalin; +Cc: mailing list for ConTeXt users
On 4/3/2021 9:46 PM, Thangalin wrote:
> A bug report exists for the -inkscape-font-specification issue:
>
> https://bugs.launchpad.net/inkscape/+bug/1324809
> <https://bugs.launchpad.net/inkscape/+bug/1324809>
>
> I've migrated it, so hopefully it'll get some traction:
>
> https://gitlab.com/inkscape/inbox/-/issues/4704
> <https://gitlab.com/inkscape/inbox/-/issues/4704>
>
> It'd be nice to support that particular extension; however, the reason
> for not supporting it is sound. It sucks because end users don't care
> about such technical minutiae and can't readily unravel such font
> discrepancy issues when encountered.
maybe later as an add-on .. adding heuristics like that always are to be
optional
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-03 21:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03 18:10 SVG comments, transparency, and extended font styles Thangalin
2021-04-03 18:25 ` Hans Hagen
2021-04-03 19:46 ` Thangalin
2021-04-03 21:15 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).