inkscape

How do I add unique, colored symbols to text in Inkscape?


I'm designing a card for a board game. I want a heart symbol to appear next to every mention of the word "health". Such as "<3 Health" but instead of text it's a unique path/object thing that looks like a heart. I may have as many as 12 of these symbols in a body of text.

Naturally you can add spaces and add the symbol yourself, but I'd like the symbol to scale with the size of the text, and for removing characters in the text to move the symbol, especially as the text area wraps.


Solution

  • This is an ideal use of Unicode. You can either use "standard" emoji in some normal font, custom emoji in an extended font (e.g. Font Awesome), or create your own custom font with your own custom symbols.

    Here is an SVG I made in Inkscape using 3 different methods.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <svg width="200" height="150" viewBox="0 0 50 40" version="1.1" id="svg121" inkscape:version="1.1.2 (b8e25be833, 2022-02-05)" sodipodi:docname="temp.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
     <defs id="defs115" />
     <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.200266" inkscape:cx="103.89761" inkscape:cy="71.71279" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:document-rotation="0" showgrid="false" units="px" borderlayer="true" inkscape:pagecheckerboard="0" inkscape:window-width="1920" inkscape:window-height="1001" inkscape:window-x="-9" inkscape:window-y="-9" inkscape:window-maximized="1" />
     <metadata id="metadata118">
      <rdf:RDF>
       <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
       </cc:Work>
      </rdf:RDF>
     </metadata>
     <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" style="font-size:7px;line-height:1;font-family:consolas;text-align:center;text-anchor:middle">
      <text xml:space="preserve" x="25" y="10" id="text1">The <tspan style="fill:#ff0000" id="tspan1">♥</tspan>Heart</text>
      <text xml:space="preserve" x="25" y="20" id="text2">The <tspan style="font-family:FontAwesome;fill:#ff0000" id="tspan2">&#xf004;</tspan>Heart</text>
      <text xml:space="preserve" x="25" y="30" id="text3">The <tspan style="font-family:FontAwesome;fill:#ff0000" id="tspan3"></tspan>Heart</text>
     </g>
    </svg>
    

    heart emoji inline with text