Category:SVG simplification by embedding text
direct to: SVG simplification by text switch0
Many other simple shapes can be realized with a <span>
version, as e.g. (see Modèle:4/5), or (see Modèle:5/5).[clarification needed]
Often the embedding of text keeps a file small, while on the contrary converting text to paths makes them unnecessarily large.
In most cases the best option to embed text is text-anchor="middle". With e.g. transform="scale(.6 1)" the text can be zoomed to its space (example)
In some cases of only few simple characters it can be better to draw them with paths, e.g. structural formulas.
Base fourteen fonts
Category:File accuracy disputes#SVG%20simplification%20by%20embedding%20textFourteen typefaces are known as the standard 14 fonts:
- Times (v3) (in regular, italic, bold, and bold italic)
- Courier (in regular, oblique, bold and bold oblique)
- Helvetica (v3) (in regular, oblique, bold and bold oblique)
- Symbol
- Zapf Dingbats
Some tools (Inkscape is a bad example) create very complex attributing for the <text> element.
Instead of defining once the attributes and using it for all text of the same appearance,
often the definition is repeated again and again for each single word or letter.
As usual, such a definition is often a large block comprising more than 1000 bytes,
declaring all defaults and all the not-used attributing:
stroke="none" but then
- stroke-width="0.26458332px"
- stroke-linecap="butt"
- stroke-linejoin="miter"
- stroke-miterlimit="4"
- stroke-dasharray="none"
- stroke-dashoffset="0"
- stroke-opacity="1"
A typical example for such definitions is (in that diagram) the ever and ever repeated
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;line-height:2.64583325px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:0px;word-spacing:0px;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
x="60.409351"
y="54.664547"
id="text8535">
<tspan
sodipodi:role="line"
id="tspan8533"
x="60.409351"
y="54.664547"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;stroke-width:0.26458332px">0
</tspan>
</text>
needing each time more than 1400 bytes where less than 100 bytes used only once for all texts are enough, as is shown in this example:
<g font-family="Verdana" font-size="27" font-style="italic">
<text x="107" y="192">n+</text>
<text x="440" y="192">n+</text>
<text x="242" y="246">p</text>
<text x="299" y="186">x</text>
<text x="286" y="237">L</text>
<text x="26" y="81">Source</text>
<text x="377" y="81">Drain</text>
<text x="221" y="42">Gate</text>
<text x="173" y="339">Body</text>
<text x="112" y="57">Oxide</text>
</g>
<tspan> can be nested+
<g font-size="12px">
<text font-weight="bold" x="10" y="10">Wikipedia hosts knowledges
<tspan fill="blue"> contributed
<tspan text-anchor="end" dy="12"> by volunteers</tspan>
</tspan>
</text>
<text font-style="italic" x="15" y="30">Wikimedia Commons hosts free media files for all sister projects.</text>
</g>
When text is converted to path, Inkscape likes it to leave all the <text> and <tspan> definitions, followed then by the now <path> text.
Category:SVG simplification techniques#%20T Category:Translation possible - SVG#%20Pages in category "Category:SVG simplification by embedding text"
- Category:SVG created also with font "Garuda"
- Category:SVG simplification by text switch
- File:JordanRiver de.svg
- File:1 km2.svg
- File:1,2,3-trichloropropane.svg
- File:1,3,5-Trioxane.svg
- File:1-methoxydecane.svg
- File:1-tetradecanol-Line-Structure.svg
- File:1F30D.svg
- File:2-3 strom - struktura obecne.svg
- File:7360 pinout.svg
- File:FresnelLens.svg
- File:ABBEJEM.svg
- File:ABBHOJA3.svg
- File:ABBHOJA4.svg
- File:ABBHOJA5.svg
- File:Acht-trigramme.svg
- File:Aelfgifu theories thumbnail.svg
- File:Alberta Highway 489.svg
- File:Alejo y Valentina.svg
- File:Alfa beta gamma radiation.svg
- File:AmdahlsLaw german.svg
- File:Andorra Schengen sign.svg
- File:Andorra traffic signal II.A.10.svg
- File:ASS DSIP example.svg
- File:Bandera Club Nacional de Fútbol.svg
- File:Binary entropy plot.svg
- File:Chess x0t45.svg
- File:Circle area Monte Carlo integration.svg
- File:CircUniformDistOfMean.svg
- File:Citation-needed-vertical.svg
- File:Citation-needed.svg
- File:Color guide flags.svg
- File:Decoration without ribbon - en.svg
- File:Decoration without ribbon - sr.svg
- File:Demonstration of linear gradient.svg
- File:Diagonal-Sudoku-by-Skratt.svg
- File:Do not remove 1=.svg
- File:Dragon's Triangle.svg
- File:Entschlüsselung (symmetrisches und asymmetrisches Kryptosystem) Schema.svg
- File:Equiangular pentagon 00.svg
- File:EU-section-with-A.svg
- File:EU-section-with-BG.svg
- File:EU-section-with-SK.svg
- File:Fsm grammar.svg
- File:FusionintheSun.svg
- File:Gauss Sphere Charge Inside.svg
- File:Gd&t freestate.svg
- File:Gd&t leastmaterialcondition.svg
- File:Gd&t maximummaterialcondition.svg
- File:Gd&t projectedtolerancezone.svg
- File:Gd&t regardlessoffeaturesize.svg
- File:Gd&t tangentplane.svg
- File:Gd&t unilateral.svg
- File:GER-FRA 2016-07-07.svg
- File:Gluelebensdauerrp-de.svg
- File:Gold medal icon (G initial) ta.svg
- File:Golden Gate Bridge jumpers by year.svg
- File:HdBG Logo.svg
- File:Hex board 11x11.svg
- File:Hexagonal dichteste Kugelpackung.svg
- File:Holzkonstruktion 2.svg
- File:Hyperstab.svg
- File:Idc34m.svg
- File:Impedances in parallel.svg
- File:Inductors in parallel.svg
- File:Inverted u.svg
- File:ISO 639 Icon el.svg
- File:ISO 639 Icon eu.svg
- File:ISO 639 Icon new.svg
- File:Kepler-first-law.svg
- File:Korean consonants.svg
- File:Lateral mosfet.svg
- File:Lens6b-ar.svg
- File:Lens6b-fr.svg
- File:License plate of Bitola.svg
- File:License plate of Kratovo.svg
- File:Logo - Grand Site de France.svg
- File:Logo du M2 de Lausanne.svg
- File:Logo du M3 de Lausanne.svg
- File:Man in the middle attack.svg
- File:Mayan00 19.svg
- File:MediaWiki SVG fonts.svg
- File:Nibelle - Composition de la population.svg
- File:No image available-az.svg
- File:No vandalism allowed on Wikipedia.svg
- File:Non-EU-section-with-MK-2012.svg
- File:Non-EU-section-with-SRB-2011.svg
- File:Number-systems (NZQRC).svg
- File:Number-systems.svg
- File:Optimizing-different-part-es.svg
- File:OtherEditor logo.svg
- File:OtherTool logo-I.svg
- File:OtherTool logo-V.svg
- File:OtherTool logo.svg
- File:Plastic-recyc-05.svg
- File:Plastic-recyc-06.svg
- File:Plimsoll line es.svg
- File:Polit Workaround.svg
- File:PPi symbol.svg
- File:QRS normal.svg
- File:Recycling-Code-90.svg
- File:Rotation of a vector as double reflection along vectors (small angle).svg
- File:Ruta provincial 00 (Argentina) plantilla.svg
- File:Référence nécessaire.svg
- File:Safinamide metabolism.svg
- File:Sammellinse leicht gewölbt.svg
- File:Sandkegel.svg
- File:Signallampentafel.svg
- File:Spain traffic signal r308c.svg
- File:Sulfur monoxide.svg
- File:Susana-logo.svg
- File:SVG category subtree.svg
- File:SVG text position bug.svg
- File:Teilgraphenbeziehungen.svg
- File:Translation arrow hy.svg
- File:Translation arrow ka.svg
- File:Translation Chinese Character.svg
- File:Translation horizontal.svg
- File:Translation Latin Alphabet.svg
- File:Translation to vi arrow.svg
- File:Trapez mit Höhe.svg
- File:Tree map import che lby show 2009.svg
- File:Tsukubai-inscription.svg
- File:U+03BB.svg
- File:U+066D.svg
- File:U+211F.svg
- File:U+214F.svg
- File:U+2153.svg
- File:U+2204 red.svg
- File:U+2600.svg
- File:U+2601.svg
- File:U+2603.svg
- File:U+260E.svg
- File:U+260F.svg
- File:U+2620.svg
- File:U+2621.svg
- File:U+2690.svg
- File:U+2691.svg
- File:U+26A1.svg
- File:U+26E9.svg
- File:U+26FD.svg
- File:U+3294.svg
- File:Unknown logo-I.svg
- File:Unknown logo-V.svg
- File:Unknown logo.svg
- File:Vandalismus.svg
- File:Verschlüsselung (asymmetrisches Kryptosystem) Schema.svg
- File:Waschen 30.svg
- File:֍.svg
- File:֎.svg
- File:۩sign.svg
- File:ॐ.svg
- File:‰-sign.svg
- File:ↈ.svg
- File:☭ on red.svg
- File:✔.svg
- File:⬋.svg
- File:Ⰹ.svg
- File:㓾.svg
- File:㙸.svg
- File:儉.svg
- File:小.svg
- File:桃.svg
- File:梅.svg
- File:氣.svg
- File:謹.svg
- File:龍.svg
- File:사랑.svg