Firefox中糟糕的svg文本对齐方式

时间:2016-09-05 13:12:28

标签: firefox svg

我有这个svg https://jsfiddle.net/CalvinMcGee/3cvqL630/1/

<svg
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:cc="http://creativecommons.org/ns#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    version="1.1"
    id="cityhall"
    viewBox="0 0 640 395"
    xml:space="preserve"
>
    <defs id="defs4242">
        <clipPath id="myClip">
            <path
                inkscape:connector-curvature="0"
                id="path4203"
                d="m 586.5,309.2 -4.3,-22.8 -2.9,-28.1 1.6,-1 c 0,0 -4.3,-0.8 -5.9,-1.5 -1.7,-0.5 -2,-1.6 -2,-1.6 l -0.8,-4.3 -0.7,-8.7 1.7,-1 0,-0.9 -1.9,-0.8 -1.8,-0.9 -1.5,-1.3 0,0 -0.2,-0.9 c 0,0 1,-0.4 1.1,-1.4 0,-0.5 -0.5,-1.1 -1.2,-1.6 -0.8,-0.5 -0.8,-1.7 -0.8,-1.7 0,0 0.8,0 0.9,-0.7 0.1,-0.5 -0.3,-0.6 -0.8,-0.9 l -0.3,-3.4 0,-0.6 0,-0.8 0.8,-0.2 0.1,-1.4 -1.2,0.7 -0.6,-1 -0.3,1 -1.3,-0.3 0.5,1.2 1,0.1 c 0,0.1 0.1,0.5 0.2,0.8 l 0.1,0.6 c 0.1,1.7 0.2,2.4 0.3,3.4 -0.1,0.1 -0.6,0.4 -0.6,0.9 0.1,0.8 0.9,0.7 0.9,0.7 0,0 0.1,1.2 -0.6,1.9 -0.7,0.8 -0.8,1.4 -0.7,1.8 0,0.5 1.1,1.1 1.1,1.1 l 0.1,0.9 -0.1,0.1 c 0,0 0,0 0,0 l -1,1.3 -1.9,1.1 -2.1,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l 0,-3.5 0,-0.6 0.1,-0.8 0.9,-0.1 0.3,-1.5 -1.3,0.6 -0.5,-1.1 -0.4,1 -1.3,-0.5 0.3,1.3 1,0.3 c 0,0.1 0.1,0.5 0.1,0.9 l 0,0.6 c -0.1,1.8 0,2.5 -0.1,3.5 -0.1,0 -0.7,0.3 -0.7,0.9 0,0.8 0.8,0.8 0.8,0.8 0,0 0,1.2 -0.8,1.9 -0.8,0.7 -0.9,1.4 -1,1.8 0,0.5 1,1.3 1,1.3 l 0,0.9 0,0 -1.3,1.4 -2.1,1 -2.3,1.1 -0.1,1.1 1.7,0.7 -0.4,9 -0.6,4.4 c 0,0.1 -0.1,1.8 -2,2.4 -1.9,0.6 -5,1.1 -5,1.1 l 1.6,1.3 -1.9,29.5 -0.5,7.6 -5.5,83.6 L 379.2,434 606,416.5 586.5,309.2 Z m -207.3,-198.6 -5.7,0 -0.4,-19 c 0,0 0.3,-2.7 3.1,-3.1 2.7,-0.5 3,2.6 3,2.6 l 0,19.5 z"
            />
        </clipPath>
        <filter style="color-interpolation-filters:sRGB;" inkscape:label="Blur" id="filter4306">
            <feGaussianBlur stdDeviation="10 10" result="blur" id="feGaussianBlur4308" />
        </filter>
    </defs>
    <sodipodi:namedview
         pagecolor="#ffffff"
         bordercolor="#666666"
         borderopacity="1"
         objecttolerance="10"
         gridtolerance="10"
         guidetolerance="10"
         inkscape:pageopacity="0"
         inkscape:pageshadow="2"
         inkscape:window-width="1916"
         inkscape:window-height="1041"
         id="namedview4240"
         showgrid="false"
         inkscape:zoom="1"
         inkscape:cx="146.3026"
         inkscape:cy="171.56858"
         inkscape:window-x="1920"
         inkscape:window-y="18"
         inkscape:window-maximized="0"
         inkscape:current-layer="layer2"
    />
    <g inkscape:groupmode="layer" id="layer4" inkscape:label="Shadow" style="display:inline" >
        <path
            id="path44441"
            style="opacity:0.35;fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1;filter:url(#filter4306)"
            d="m 324.3164,208.65142 1.16406,1.02246 1.33789,0.75195 1.50391,0.75195 0,0.66993 -1.41993,0.66796 0.16602,6.9375 0.33398,3.17579 0.084,0.25 c 42.28891,-6.76957 76.88867,-12.36914 76.88867,-12.36914 l 0.83594,-50.06055 0.50195,-29.25195 -3.59375,-2.67383 c 0,0 6.51852,-1.25347 10.69727,-2.75782 4.0116,-1.50435 4.0957,-5.26449 4.0957,-5.43164 l -1.75586,-1.2539 -0.16602,-5.6836 2.67383,-2.67382 0,-19.808601 -3.84375,-1.41992 0,-2.42383 4.84766,-2.58984 1.83789,-3.8457 2.58984,1.58789 2.75782,-3.0918 0.084,-0.002 0,-0.75 c 0,0 -2.25586,-1.67093 -2.25586,-2.67383 0,-1.0029 0.25038,-2.42379 1.92188,-4.01172 1.6715,-1.67149 1.67187,-4.34766 1.67187,-4.34766 0,0 -1.83789,0.25075 -1.83789,-1.58789 0,-1.17005 1.25318,-1.83675 1.50391,-2.0039 0.0836,-2.17295 -0.084,-3.76144 -0.084,-7.68946 -4.17874,-0.0836 -9.02536,-4.76486 -10.61328,-6.60351 l -2.42383,-0.5 -1.2539,-3.34375 2.92578,0.91992 0.83593,-2.25781 1.16993,2.33984 2.75781,-1.50391 -0.58594,3.42774 -1.7539,0.66797 c 1.25362,1.3372 5.01452,5.51676 8.77539,5.34961 0,-0.6686 -0.084,-1.58913 -0.084,-1.83985 l -2.25781,-0.50195 -0.83594,-2.75781 2.92578,0.91992 0.83594,-2.25586 1.16992,2.33984 2.75781,-1.5039 -0.50195,3.17578 -1.83789,0.33398 0.25,1.83789 c 3.84445,-0.25072 7.10534,-3.34236 8.27539,-5.84961 l -2.08984,-0.25195 -0.83594,-2.83984 2.5918,0.91797 1.16992,-2.17188 4e-5,1.6e-4 1.33594,2.33984 2.17383,-1.16992 -0.66993,3.3418 -2.33984,0.33594 c -1.25362,1.3372 -5.09652,7.35423 -10.44531,7.10351 l 0.25,7.68946 c 1.17005,0.6686 1.83902,1.08539 1.67187,2.17187 -0.3343,1.67149 -2.17383,1.50391 -2.17383,1.50391 0,0 -0.16759,2.7581 1.50391,4.01172 1.6715,1.25362 2.67496,2.59167 2.50781,3.76171 -0.25073,2.34011 -2.67383,3.00782 -2.67383,3.00782 l 0.084,0.58594 0.041,0.25 0.125,0 3.17579,3.17578 1.67187,-2.00586 2.17188,4.3457 4.26367,2.08984 -0.16797,2.00586 -4.01172,1.92188 0.41797,19.890621 3.42773,2.25782 0.33399,6.60156 -1.75586,1.0039 c 0,0 -0.5007,2.59094 3.34375,4.01172 3.51015,1.6715 13.12109,4.17774 13.12109,4.17774 l -3.76172,2.08984 0.91992,29.83594 1.5879,49.30859 c 0,0 101.71161,20.64415 113.4121,24.1543 3.0087,10.19614 13.87305,18.9707 13.87305,18.9707 l -0.83594,-20.14062 -1.42187,-0.91992 c 0,0 2.34135,-0.58531 3.8457,-1.25391 1.50432,-0.6686 1.41992,-2.00624 1.41992,-2.08984 l 0.084,-3.59375 -0.50195,-7.26954 -1.41993,-0.41796 -0.084,-0.91993 1.75586,-1.08593 1.58789,-0.91993 0.83594,-1.08593 0.082,-0.084 0.084,-0.006 -0.084,-0.74609 c 0,0 -0.83437,-0.58562 -0.91797,-0.91992 0,-0.3343 -10e-4,-0.91889 0.58398,-1.50391 0.58506,-0.6686 0.50196,-1.58789 0.50196,-1.58789 0,0 -0.66836,0.16624 -0.75196,-0.58594 0,-0.41787 0.41836,-0.75195 0.50196,-0.75195 0,-0.83575 -0.16836,-1.33745 -0.25196,-2.8418 l 0,-0.58398 c 0,-0.25073 -0.16601,-0.58632 -0.16601,-0.66992 l -0.83594,-0.082 -0.41797,-1.00391 1.08594,0.25195 0.25,-0.83593 0.50195,0.83593 1.00391,-0.58593 -0.084,1.16992 -0.66796,0.16797 0,0.66796 0,0.50196 0.25,2.84179 c 0.41787,0.25072 0.75156,0.33409 0.66796,0.75196 -0.0836,0.66858 -0.75195,0.58398 -0.75195,0.58398 0,0 -6.3e-4,1.00401 0.66797,1.42188 0.6686,0.41788 1.00391,0.91805 1.00391,1.33593 -0.0836,0.91932 -0.91993,1.25391 -0.91993,1.25391 l 0.16797,0.75195 0.084,0.084 -0.16797,0 -0.50195,0 c -0.13235,0 -0.28708,0.0243 -0.44141,0.0586 l 0.94336,-0.0586 1.2539,1.08594 1.50391,0.75195 1.58789,0.66992 0,0.75195 -1.41992,0.83594 0.58398,7.27149 0.66797,3.59375 c 0,0 0.25111,0.91806 1.67188,1.33593 1.3372,0.58502 4.93164,1.25391 4.93164,1.25391 l -1.33789,0.83594 2.42383,23.48437 3.59375,19.05469 16.54882,89.59375 -189.54882,14.625 -285.32422,-33.93164 4.5957,-69.86914 0.41797,-6.35156 1.58789,-24.6543 -1.33594,-1.08594 c 0,0 2.58982,-0.41847 4.17774,-0.91992 1.58787,-0.50145 1.67187,-1.92226 1.67187,-2.00586 l 0.50195,-3.67773 0.33399,-7.52149 -1.42188,-0.58398 0.084,-0.91993 1.92187,-0.91992 1.75586,-0.83593 1.08594,-1.16993 1.42188,0 0.084,0.084 1.08594,1.16992 1.41992,0.91992 1.58789,0.83594 -0.084,0.75195 -1.5879,0.66797 -0.16601,7.60547 0.25,3.76172 c 0,0 0.16711,1.00287 1.58789,1.58789 1.25362,0.6686 4.93164,1.83789 4.93164,1.83789 l -1.50391,0.75195 -0.084,14.20899 c 0,0 5.5155,-6.26893 6.68555,-10.53125 2.50724,-0.58502 79.56436,-12.95503 143.33203,-23.31836 0.25073,-0.58506 0.25,-1.00195 0.25,-1.00195 l 0.25,-3.34376 0,-6.85156 -1.33594,-0.50195 0,-0.83594 1.66992,-0.91992 1.50586,-0.83594 1.08344,-1.22866 0.002,-0.35929 c 0,0 -0.75234,-0.58367 -0.83594,-0.91797 0,-0.3343 0.083,-0.83685 0.66797,-1.42187 0.58503,-0.58502 0.58594,-1.42031 0.58594,-1.50391 0,0 -0.66797,0.0827 -0.66797,-0.58594 0,-0.41788 0.4164,-0.66796 0.5,-0.66796 0,-0.75218 -0.082,-1.25306 -0.082,-2.67383 l 0,-0.50196 c 0,-0.25072 -0.084,-0.50081 -0.084,-0.66796 l -0.75195,-0.16797 -0.33398,-0.91993 1.00195,0.33594 0.33398,-0.83594 1.5e-4,2e-5 0.41797,0.83594 0.91992,-0.50195 -0.16796,1.08594 -0.66797,0.084 -0.084,0.66797 0,0.50195 0.084,2.67383 c 0.41788,0.25073 0.66758,0.33407 0.58398,0.75195 -0.0836,0.58506 -0.75195,0.50196 -0.75195,0.50196 0,0 -0.0831,1.004 0.50195,1.42187 0.58503,0.41787 0.91954,0.91806 0.83594,1.33594 0,0.75217 -0.83594,1.08594 -0.83594,1.08594 m -162.63687,2.92574 -0.33398,0.83594 -1.08594,-0.41797 0.25,1.08593 0.83594,0.25196 c 0,0.16715 0.084,0.50123 0.084,0.75195 l 0,0.50195 c -0.0836,1.50435 -3.8e-4,2.08808 -0.084,2.92383 -0.0836,0.0836 -0.58594,0.33408 -0.58594,0.75196 -0.0836,0.7522 0.66992,0.66992 0.66992,0.66992 0,0 -0.001,1.00287 -0.66992,1.58789 -0.6686,0.58502 -0.83594,1.08602 -0.83594,1.5039 0,0.41787 0.83594,1.08594 0.83594,1.08594 l 0,0.75196 -0.082,0.084 0.83398,0 c 0.25073,0 0.50318,0.084 0.75391,0.084 l -0.084,-0.084 -0.084,-0.75195 c 0,0 0.91879,-0.25019 1.08594,-1.08594 0.0836,-0.50145 -0.25091,-1.00328 -0.83594,-1.67188 -0.58505,-0.50144 -0.5,-1.58789 -0.5,-1.58789 0,0 0.66684,0.0827 0.83399,-0.58593 0.0836,-0.41788 -0.16612,-0.58522 -0.58399,-0.83594 l 0,-2.92383 0,-0.50195 0.084,-0.66797 0.75195,-0.084 0.25,-1.2539 -1.08594,0.50195 -0.41797,-0.91992 z"
            inkscape:connector-curvature="0"
            sodipodi:nodetypes="cccccccccccccccccccccccccccsccsccccccccccccccccccccccccccccccccccccsccccccccccccccccccccccccscccccccccccccccccsccccccccccccccscccccscccccccccccccccccccccscccccccccccccccccccccccccccccccccccscsscccccccccccccccccccccccscccccscccscccccccccccccccc"
            transform="matrix(1.0623661,0,0,1.0623661,-41.649422,-25.667841)"
         />
    </g>
    <path
         style="fill:#ffffff"
         inkscape:connector-curvature="0"
         id="path4200"
         d="m 586.93674,255.15911 -3.81785,-20.24347 -2.57482,-24.94919 1.42059,-0.88786 c 0,0 -3.81784,-0.7103 -5.23844,-1.33181 -1.50939,-0.44393 -1.77574,-1.4206 -1.77574,-1.4206 l -0.7103,-3.81785 -0.62151,-7.72448 1.50938,-0.88786 0,-0.79909 -1.68695,-0.7103 -1.59817,-0.79908 -1.33182,-1.15424 0,0 -0.17757,-0.79908 c 0,0 0.88787,-0.35515 0.97666,-1.24302 0,-0.44393 -0.44394,-0.97666 -1.06544,-1.4206 -0.7103,-0.44393 -0.7103,-1.50938 -0.7103,-1.50938 0,0 0.7103,0 0.79908,-0.62151 0.0888,-0.44393 -0.26636,-0.53272 -0.71029,-0.79908 l -0.26637,-3.01877 0,-0.53272 0,-0.7103 0.7103,-0.17756 0.0888,-1.24303 -1.06544,0.62151 -0.53272,-0.88787 -0.26637,0.88787 -1.15423,-0.26636 0.44393,1.06544 0.88787,0.0888 c 0,0.0888 0.0888,0.44393 0.17758,0.7103 l 0.0888,0.53272 c 0.0888,1.50938 0.17758,2.1309 0.26636,3.01877 -0.0888,0.0888 -0.53272,0.35515 -0.53272,0.79908 0.0888,0.7103 0.79909,0.62151 0.79909,0.62151 0,0 0.0888,1.06544 -0.53273,1.68696 -0.62151,0.7103 -0.7103,1.24302 -0.62151,1.59817 0,0.44393 0.97666,0.97665 0.97666,0.97665 l 0.0888,0.79908 -0.0888,0.0888 c 0,0 0,0 0,0 l -0.88787,1.15423 -1.68696,0.97666 -1.86453,1.15423 0.0888,0.97666 1.50938,0.44394 0.53272,7.72448 -0.0888,3.81785 c 0,0.0888 0.0888,1.50938 -1.50938,2.21967 -1.59817,0.7103 -4.08421,1.33181 -4.08421,1.33181 l 1.50939,0.97666 0.88787,21.3977 c 0,0 -11.54233,-9.32264 -14.73867,-20.15468 C 536.32806,208.9898 428.2741,187.05937 428.2741,187.05937 l -1.68696,-52.38442 -0.97666,-31.69701 3.99542,-2.21969 c 0,0 -10.21051,-2.663604 -13.93958,-4.439349 -4.08421,-1.509377 -3.55149,-4.261788 -3.55149,-4.261788 l 1.86454,-1.065446 -0.35515,-7.014177 -3.64027,-2.397261 -0.44394,-21.13134 4.26179,-2.042103 0.17757,-2.130892 -4.52814,-2.219679 -2.30847,-4.616932 -1.77575,2.130891 -3.37391,-3.373911 -0.17758,0 -0.0888,-0.621511 c 0,0 2.57482,-0.799084 2.84119,-3.196337 0.0888,-1.24302 -0.88787,-2.663615 -2.66362,-3.995422 -1.77574,-1.331807 -1.59817,-4.261783 -1.59817,-4.261783 0,0 1.95332,0.177574 2.30847,-1.59817 0.26636,-1.243019 -0.53272,-1.598168 -1.77574,-2.308465 l -0.26637,-8.168418 c 5.68238,0.266361 9.85538,-6.126314 11.0984,-7.546908 l 2.48604,-0.355149 0.7103,-3.551487 -2.39726,0.887873 -1.86453,-2.130892 -1.24302,2.308465 -2.7524,-0.976658 0.88787,3.018763 2.21968,0.266362 c -1.24302,2.574827 -4.70572,5.948739 -8.78993,6.215101 l -0.26636,-1.953318 1.95332,-0.355149 0.53272,-3.373911 -2.92997,1.598168 -1.24302,-2.48604 -0.88787,2.397253 -3.10755,-0.976659 0.88786,2.929976 2.39726,0.532724 c 0,0.355148 0.0888,1.243019 0.0888,1.953317 -3.99542,0.08878 -7.90205,-4.350571 -9.32264,-5.682378 l 1.86453,-0.710297 0.6215,-3.640273 -2.92997,1.598168 -1.24302,-2.48604 -0.88788,2.397253 -3.10754,-0.976659 1.33181,3.551487 2.57482,0.532722 c 1.68696,1.953318 6.83662,6.925398 11.27597,7.014186 0,4.172996 0.17757,5.859952 0.0888,8.168418 -0.26636,0.08878 -1.59817,0.799084 -1.59817,2.130892 0,1.953317 1.95332,1.686955 1.95332,1.686955 0,0 0,2.841189 -1.77574,4.616932 -1.77575,1.775744 -2.0421,3.196338 -2.0421,4.261784 0,1.065446 2.39725,2.841188 2.39725,2.841188 l 0,0.355149 0,0 -2.92998,3.285125 -2.75241,-1.686956 -1.95331,4.084209 -5.14966,2.752401 0,2.574829 4.08422,1.509381 0,21.042557 -2.8412,2.841182 0.17758,6.037533 1.86453,1.331803 c 0,0.177574 -0.0888,4.172995 -4.35057,5.771166 -4.43936,1.59817 -11.36476,2.929975 -11.36476,2.929975 l 3.81785,2.84119 -0.53273,31.07551 -0.88786,53.1835 c 0,0 -36.75789,5.94874 -81.68418,13.1405 l -0.44395,-3.37391 -0.17757,-7.36934 1.50939,-0.71029 0,-0.7103 -1.59817,-0.79909 -1.4206,-0.79908 -1.15423,-1.15424 0,0 -0.0888,-0.71029 c 0,0 0.88787,-0.26636 0.97666,-1.15423 0,-0.44393 -0.35514,-0.88788 -0.88787,-1.4206 -0.62151,-0.44393 -0.53272,-1.50938 -0.53272,-1.50938 0,0 0.7103,0.0888 0.79908,-0.53272 0.0888,-0.44394 -0.17758,-0.53272 -0.62151,-0.79909 l -0.0888,-2.84118 0,-0.53273 0.0888,-0.71029 0.7103,-0.0888 0.17758,-1.15423 -0.97667,0.53273 -0.44393,-0.88788 -0.35515,0.88788 -1.06545,-0.35515 0.35515,0.97665 0.79908,0.17758 c 0,0.0888 0.0888,0.44394 0.0888,0.7103 l 0,0.53272 c 0,1.42059 0.0888,2.04211 0.0888,2.84119 -0.0888,0 -0.53272,0.26636 -0.53272,0.7103 0,0.7103 0.71029,0.6215 0.71029,0.6215 0,0.0888 0,0.97667 -0.6215,1.59817 -0.62152,0.62152 -0.7103,1.15424 -0.7103,1.50939 0,0.35514 0.88787,0.97666 0.88787,0.97666 l 0,0.7103 0,0 -0.97666,1.15422 -1.59817,0.88788 -1.77574,0.97666 0,0.88786 1.4206,0.53273 0,7.28055 -0.26637,3.55148 c 0,0 0,0.53272 -0.26635,0.97667 0,0 0,0 0,0 -67.74461,10.92081 -149.60636,24.06131 -152.26998,24.68282 -1.24302,4.52814 -7.10297,11.18718 -7.10297,11.18718 l 0.0888,-15.09381 1.59816,-0.79909 c 0,0 -3.90662,-1.24302 -5.23844,-1.95332 -1.50938,-0.6215 -1.68695,-1.68695 -1.68695,-1.68695 l -0.26636,-3.99542 0.17758,-8.07964 1.68695,-0.71029 0.0888,-0.79908 -1.68695,-0.88788 -1.50938,-0.97665 -1.15424,-1.24302 0,0 -0.0888,-0.0888 -0.0888,-0.79908 c 0,0 0.97666,-0.26636 1.15424,-1.15424 0.0888,-0.44393 -0.26637,-1.06543 -0.97667,-1.59816 -0.62151,-0.53272 -0.53272,-1.68696 -0.53272,-1.68696 0,0 0.71029,0.0888 0.88787,-0.6215 0.0888,-0.44395 -0.17758,-0.62152 -0.62151,-0.88788 l 0,-3.10755 0,-0.53272 0.0888,-0.7103 0.79909,-0.0888 0.26635,-1.3318 -1.15422,0.53272 -0.44395,-0.97666 -0.35514,0.88787 -1.15423,-0.44393 0.26636,1.15422 0.88787,0.26637 c 0,0.0888 0.0888,0.44393 0.0888,0.79908 l 0,0.53273 c -0.0888,1.59817 0,2.21968 -0.0888,3.10754 -0.0888,0 -0.62151,0.26637 -0.62151,0.79909 0,0.7103 0.7103,0.7103 0.7103,0.7103 0,0 0,1.06545 -0.7103,1.68695 -0.7103,0.62152 -0.79908,1.24303 -0.88787,1.59818 0,0.44393 0.88787,1.15422 0.88787,1.15422 l 0,0.79909 0,0 -1.15423,1.24303 -1.86454,0.88787 -2.0421,0.97665 -0.0888,0.97666 1.50938,0.62151 -0.35515,7.99085 -0.53273,3.90663 c 0,0.0888 -0.0888,1.59816 -1.77574,2.13089 -1.68695,0.53272 -4.43935,0.97666 -4.43935,0.97666 l 1.42058,1.15423 -1.68695,26.19221 -0.44393,6.74782 -4.883294,74.22607 303.119334,36.04758 201.36927,-15.53775 -17.3135,-95.26862 z M 402.88097,78.82783 l -5.06087,0 -0.35515,-16.869559 c 0,0 0.26637,-2.397253 2.75241,-2.752401 2.39725,-0.443936 2.66361,2.308465 2.66361,2.308465 l 0,17.313495 z"
    />
    <rect
         style="fill:#6d8799"
         clip-path="url(#myClip)"
         height="156"
         width="640"
         y="277"
         x="0"
         id="cityhall__overlay"
         transform="matrix(0.88787154,0,0,0.88787154,66.200084,-19.370762)"
    />
    <g id="g4206" transform="matrix(0.88787154,0,0,0.88787154,66.200084,-19.370762)">
        <path
            style="fill:none;stroke:#6d8799;stroke-width:3.37886715;stroke-miterlimit:10"
            inkscape:connector-curvature="0"
            id="path4208"
            d="m 586.5,309.2 -4.3,-22.8 -2.9,-28.1 1.6,-1 c 0,0 -4.3,-0.8 -5.9,-1.5 -1.7,-0.5 -2,-1.6 -2,-1.6 l -0.8,-4.3 -0.7,-8.7 1.7,-1 0,-0.9 -1.9,-0.8 -1.8,-0.9 -1.5,-1.3 0,0 -1.6,0.1 -0.1,0.1 0,0 -1,1.3 -1.9,1.1 -2.1,1.3 0.1,1.1 1.7,0.5 0.6,8.7 -0.1,4.3 c 0,0.1 0.1,1.7 -1.7,2.5 -1.8,0.8 -4.6,1.5 -4.6,1.5 l 1.7,1.1 1,24.1 c 0,0 -13,-10.5 -16.6,-22.7 -14,-4.2 -135.7,-28.9 -135.7,-28.9 l -1.9,-59 -1.1,-35.7 4.5,-2.5 c 0,0 -11.5,-3 -15.7,-5 -4.6,-1.7 -4,-4.8 -4,-4.8 l 2.1,-1.2 -0.4,-7.9 -4.1,-2.7 -0.5,-23.8 4.8,-2.3 0.2,-2.4 -5.1,-2.5 -2.6,-5.2 -2,2.4 -3.8,-3.8 -0.2,0 -4.3,0.1 0,0 -3.3,3.7 -3.1,-1.9 -2.2,4.6 -5.8,3.1 0,2.9 4.6,1.7 0,23.7 -3.2,3.2 0.2,6.8 2.1,1.5 c 0,0.2 -0.1,4.7 -4.9,6.5 -5,1.8 -12.8,3.3 -12.8,3.3 l 4.3,3.2 -0.6,35 -1,59.9 c 0,0 -41.4,6.7 -92,14.8 -3,0.5 -6.1,1 -9.2,1.5 0,0 0,0 0,0 -76.3,12.3 -168.5,27.1 -171.5,27.8 -1.4,5.1 -8,12.6 -8,12.6 l 0.1,-17 1.8,-0.9 c 0,0 -4.4,-1.4 -5.9,-2.2 -1.7,-0.7 -1.9,-1.9 -1.9,-1.9 l -0.3,-4.5 0.2,-9.1 1.9,-0.8 0.1,-0.9 -1.9,-1 -1.7,-1.1 -1.3,-1.4 -0.1,-0.1 0,0 0,0 -1.7,0 0,0 -1.3,1.4 -2.1,1 -2.3,1.1 -0.1,1.1 1.7,0.7 -0.4,9 -0.6,4.4 c 0,0.1 -0.1,1.8 -2,2.4 -1.9,0.6 -5,1.1 -5,1.1 l 1.6,1.3 -1.9,29.5 -0.5,7.6 -5.5,83.6 341.4,40.6 226.8,-17.5 -19.8,-107.2 z m -207.3,-198.6 -5.7,0 -0.4,-19 c 0,0 0.3,-2.7 3.1,-3.1 2.7,-0.5 3,2.6 3,2.6 l 0,19.5 z"
            stroke-miterlimit="10"
        />
        <g id="g4210">
            <path
                 style="fill:#86754d"
                 inkscape:connector-curvature="0"
                 id="path4212"
                 d="m 59.4,246.5 c -0.2,1 -1.3,1.3 -1.3,1.3 l 0.1,0.9 0.1,0.1 0,0 c -0.3,0 -0.6,-0.1 -0.9,-0.1 -0.4,0 -0.7,0 -1,0 l 0.1,-0.1 0,0 0,-0.9 c 0,0 -1,-0.8 -1,-1.3 0,-0.5 0.2,-1.1 1,-1.8 0.8,-0.7 0.8,-1.9 0.8,-1.9 0,0 -0.9,0.1 -0.8,-0.8 0,-0.5 0.6,-0.8 0.7,-0.9 0.1,-1 0,-1.7 0.1,-3.5 l 0,-0.6 c 0,-0.3 -0.1,-0.7 -0.1,-0.9 l -1,-0.3 -0.3,-1.3 1.3,0.5 0.4,-1 0.5,1.1 1.3,-0.6 -0.3,1.5 -0.9,0.1 -0.1,0.8 0,0.6 0,3.5 c 0.5,0.3 0.8,0.5 0.7,1 -0.2,0.8 -1,0.7 -1,0.7 0,0 -0.1,1.3 0.6,1.9 0.7,0.8 1.1,1.4 1,2 z"
            />
        </g>
        <g id="g4214">
            <path
                style="fill:none;stroke:#6d8799;stroke-width:3.37886715;stroke-miterlimit:10"
                inkscape:connector-curvature="0"
                id="path4216"
                d="m 246.7,249.4 c 0,0 0,0 0,0 0.3,-0.6 0.3,-1.1 0.3,-1.1 l 0.3,-4 0,-8.2 -1.6,-0.6 0,-1 2,-1.1 1.8,-1 1.1,-1.3 0,0 1.6,-0.1 0,0 0.1,0.1 1.2,1.2 1.6,0.9 1.8,0.9 0,0.8 -1.7,0.8 0.2,8.3 0.4,3.8"
                stroke-miterlimit="10"
            />
            <g id="g4218">
                <path
                   style="fill:#86754d"
                   inkscape:connector-curvature="0"
                   id="path4220"
                   d="m 252.2,230.4 0.1,0.8 0,0 0.1,0.1 c -0.3,0 -0.5,0 -0.8,0 -0.3,0 -0.6,0 -0.9,0.1 l 0.1,-0.1 0,-0.8 c 0,0 -0.9,-0.7 -1,-1.1 0,-0.4 0.1,-1 0.8,-1.7 0.7,-0.7 0.7,-1.7 0.7,-1.8 0,0 -0.8,0.1 -0.8,-0.7 0,-0.5 0.5,-0.8 0.6,-0.8 0,-0.9 -0.1,-1.5 -0.1,-3.2 l 0,-0.6 c 0,-0.3 -0.1,-0.6 -0.1,-0.8 l -0.9,-0.2 -0.4,-1.1 1.2,0.4 0.4,-1 0.5,1 1.1,-0.6 -0.2,1.3 -0.8,0.1 -0.1,0.8 0,0.6 0.1,3.2 c 0.5,0.3 0.8,0.4 0.7,0.9 -0.1,0.7 -0.9,0.6 -0.9,0.6 0,0 -0.1,1.2 0.6,1.7 0.7,0.5 1.1,1.1 1,1.6 0,0.9 -1,1.3 -1,1.3 z"
                />
            </g>
        </g>
        <g id="g4222">
            <path
                style="fill:#86754d"
                inkscape:connector-curvature="0"
                id="path4224"
                d="m 392.6,35.6 -0.8,4 -2.8,0.4 c -1.5,1.6 -6.1,8.8 -12.5,8.5 l 0.3,9.2 c 1.4,0.8 2.2,1.3 2,2.6 -0.4,2 -2.6,1.8 -2.6,1.8 0,0 -0.2,3.3 1.8,4.8 2,1.5 3.2,3.1 3,4.5 -0.3,2.8 -3.2,3.6 -3.2,3.6 l 0.1,0.7 0.3,1.8 0.3,0.2 c -0.7,-0.1 -1.5,-0.1 -2.3,-0.1 -1,0 -1.9,0.1 -2.7,0.2 l 0.2,-0.2 0,-2.4 c 0,0 -2.7,-2 -2.7,-3.2 0,-1.2 0.3,-2.9 2.3,-4.8 2,-2 2,-5.2 2,-5.2 0,0 -2.2,0.3 -2.2,-1.9 0,-1.4 1.5,-2.2 1.8,-2.4 0.1,-2.6 -0.1,-4.5 -0.1,-9.2 -5,-0.1 -10.8,-5.7 -12.7,-7.9 l -2.9,-0.6 -1.5,-4 3.5,1.1 1,-2.7 1.4,2.8 3.3,-1.8 -0.7,4.1 -2.1,0.8 c 1.5,1.6 6,6.6 10.5,6.4 0,-0.8 -0.1,-1.9 -0.1,-2.2 l -2.7,-0.6 -1,-3.3 3.5,1.1 1,-2.7 1.4,2.8 3.3,-1.8 -0.6,3.8 -2.2,0.4 0.3,2.2 c 4.6,-0.3 8.5,-4 9.9,-7 l -2.5,-0.3 -1,-3.4 3.1,1.1 1.4,-2.6 1.6,2.8 2.6,-1.4 z"
            />
        </g>
        <g id="g4226">
            <path
                style="fill:#86754d"
                inkscape:connector-curvature="0"
                id="path4228"
                d="m 567.9,235.3 0.2,0.9 0,0 0.1,0.1 c -0.3,0 -0.5,0 -0.8,0 -0.3,0 -0.7,0.1 -1,0.2 0,0 0,0 0,0 l 0.1,-0.1 -0.1,-0.9 c 0,0 -1,-0.7 -1.1,-1.1 0,-0.4 0,-1.1 0.7,-1.8 0.7,-0.8 0.6,-1.9 0.6,-1.9 0,0 -0.8,0.2 -0.9,-0.7 0,-0.5 0.5,-0.9 0.6,-0.9 0,-1 -0.2,-1.6 -0.3,-3.4 l 0,-0.7 c 0,-0.3 -0.2,-0.7 -0.2,-0.8 l -1,-0.1 -0.5,-1.2 1.3,0.3 0.3,-1 0.6,1 1.2,-0.7 -0.1,1.4 -0.8,0.2 0,0.8 0,0.6 0.3,3.4 c 0.5,0.3 0.9,0.4 0.8,0.9 -0.1,0.8 -0.9,0.7 -0.9,0.7 0,0 0,1.2 0.8,1.7 0.8,0.5 1.2,1.1 1.2,1.6 -0.1,1.1 -1.1,1.5 -1.1,1.5 z"
            />
        </g>
    </g>
    <g inkscape:groupmode="layer" id="layer3" inkscape:label="Percentage" style="display:inline;opacity:0.97000002">
        <text id="cityhall__percentage" x="275" y="139.07722" style="font-weight:bold;font-size:37.5px;text-anchor:end;fill:#6d8799">
            44            </text>
        <text x="305" y="139.07722" style="font-weight:bold;font-size:37.5px;text-anchor:middle;fill:#6d8799" id="text4238">%</text>
    </g>
    <g inkscape:groupmode="layer" id="layer2" inkscape:label="Points" style="display:inline">
        <text id="cityhall__points" x="275" y="82.932281" style="font-weight:bold;font-size:37.5px;text-anchor:end;fill:#6d8799">
            17 512            </text>
        <text x="305" y="82.932281" style="font-weight:bold;font-size:37.5px;text-anchor:middle;fill:#6d8799" id="text4235">p</text>
    </g>
    <g inkscape:groupmode="layer" id="layer1" inkscape:label="Header" style="display:inline">
        <text x="318" y="22.792969" style="font-weight:bold;font-size:30px;text-anchor:end;fill:#6d8799" id="text4232">
            City Hall Challenge
        </text>
    </g>
    <g inkscape:groupmode="layer" id="layer5" inkscape:label="LinkOverlay" style="display:inline">
        <a xlink:href="/files/content/challenges/current/city-hall_sv_SE.pdf" target="_blank">
            <rect x="0" y="0" width="640" height="395" style="fill-opacity:0;" />
        </a>
    </g>
</svg>

在Chrome,IE(!)和Safari Mobile中它看起来不错,但在Firefox中看起来很糟糕。

在开发工具中检查后,它看起来像是文本锚属性。但是,text-element比实际文本大得多,这使得文本居中。

有人可以指出我正确的方向。

1 个答案:

答案 0 :(得分:0)

我剥离了大部分内容,刚开始将文本添加回svg,突然间它开始在浏览器中呈现相同的内容。

<text
    style="font-weight:bold;font-size:25px;text-anchor:end;fill:#595959"
    y="95" x="325">
    City Hall Challenge
</text>

这是完成的版本https://jsfiddle.net/CalvinMcGee/3cvqL630/5/