You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this icon is centered if you view it directly (image editor, browser, ...), but if you render it to e.g. 15x15 with svgSalamander, the icon is left aligned (if the viewbox x value would be zero)
The text was updated successfully, but these errors were encountered:
sorry, I am not familiar with the SVG specifications - I only saw that creating some font awesome icons with svgSalamander resulted in wrong aligned images. Only by changing the viewbox the icons got rendered as they should
Negative coordinates in viewBox effectively shift the coordinat system used for resolving geometry bounds.
It effectively effects like a translation e.g. if viewBox="x y w h" Then this would be "the same as" viewBox="0 0 w h" transform=translate(-x -y). Though this is only partially true as there are different behaviours of viewBox w.r.t to preserveAspectRatio and depending on which element it is applied to (the above example mostly works only for top level svg elements).
If you use a SVG image with negative viewbox values, the rendered image is not aligned in the same way the SVG is.
Take the checkmark of FontAwesome for example:
this icon is centered if you view it directly (image editor, browser, ...), but if you render it to e.g. 15x15 with svgSalamander, the icon is left aligned (if the viewbox x value would be zero)
The text was updated successfully, but these errors were encountered: