File talk:& (italic, 1735).svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Simplification[edit]

This files shows rather complicated curves, to draw them by hand seems not recommendable. But it is always possible to simplify such files. One essential step can be to reduce the accuracy from 6 digits in the fractional part of each coordinate. In the case of that small picture with significance often after the decimal mark, mere rounding to integers leaves not enough precision; but it works good when the values are first multiplied.
With the following steps:

  • scaling all coordinates 4times, from picture size 95 × 79 to ~ 400 × 400
eg. 0.323352 to 1.293408 (to avoid too small numbers)
  • then rounding all the numbers to integers
eg. 1.293408 to 1 (saves many bytes)
  • moving the glyph more to the center,
by adding constant values to both coordinates
  • and then choosing a reasonable part of the picture
in this case, 280 × 280 px

the file content lookes like that for the text editor:

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="280" height="280">
<path fill="#000" d="M148,38c-7,0-13,3-13,18 0,4 1,11 4,11 1,6-12,26-27,49-8-6-17-10-33-9-11 1-38,16-49,36-16,29-14,60 7,84 13,15 39,25 56,25c61-1 102-62 97-122 11,5 10,7 14,13 4,6 11,9 18,7 28-2 35-23 33-38 0-2-9-11-14-12-5,1-8,4-10,7-2,16 10,24-4,28-4,1-19-12-27-17-9-6-24-13-34-13-9 0-27,9-29,12-2,3 0,7 4,7 9-5 18-7 24-6 4,0 9,3 15,7 4,28-14,70-35,86-17,13-29,14-55,15-19 1-22-4-35-14 20-31 28-41 52-75 3,5 6,7 9,12 7,13 10,20 20,19 4-1 8-5 9-9 1-4-1-7-4-12-1-2-4-2-6-1-2 1-2,4-1,6 4,3 6,3 6,5 0,4-3,4-5,2-2-1-5-9-8-17-4-9-5-14-10-21 16-24 35-45 47-76-1-8-8-7-15-7zm-70,84c11,0 17,2 23,8-21,31-27,42-52,74-10-11-14-21-13-40 2-23 22-41 42-42z"/>
</svg>

and with a file size of ~760 bytes it has a reasonable appearance, like the origin file with the size 6 times larger.
The original picture has some not-so-smooth curve areas, they are truly copied to this derivate.
It will be no effort at all to move the glyph within the area; it is done easily by altering the first two coordinates (after "M"): some points less than 148 move the "&" to the left, some more to the right; more than 38 moves down, less moves up. This is so easy because all coordinates are relative to the absolute beginning M148,38 - so altering this single point performs this transformation. Of course, it may become necessary to alter also the sizes of the picture, width and height. It would be possible to insert now a SVG scaling instruction, keeping the accuracy, to have again a picture of 95 × 79px, if this size is desired.

Simplifications like this one can be done with any complicated curve of any SVG drawing, sometimes more easy, sometimes more difficult. And most can be done automated, or semi-automatic, with common Office tools. -- sarang사랑 09:18, 21 December 2010 (UTC)[reply]


In some cases, I actually do curve simplifications in FontForge. It's not a general purpose vector drawing tool, but it has specialized tools for simplifying curves and coercing them into a quasi-"canonical" form which general purpose vector editors don't really have. I used Fontforge for File:No smoking symbol.svg and several others that I don't really remember... AnonMoos (talk) 12:53, 31 December 2010 (UTC)[reply]