Giter VIP home page Giter VIP logo

Comments (5)

yisibl avatar yisibl commented on August 21, 2024

from font-carrier.

yifengwang66 avatar yifengwang66 commented on August 21, 2024

issus好像不支持发送svg和ttf格式的文件,我这里把两个svg文件的内容放过来吧

<!-- 可以正常使用的svg -->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>形状结合</title>
    <g id="提报审批-H5" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="二级负责人/待二级审批/名单非空" transform="translate(-387.000000, -106.000000)" fill="#666666">
            <path d="M389,113 L389,111 L396.999,111 L397,103 L399,103 L398.999856,111.982838 C398.999952,111.988547 399,111.994268 399,112 L398.999,112.017 L399,113 L389,113 Z" id="形状结合" transform="translate(394.000000, 108.000000) rotate(-315.000000) translate(-394.000000, -108.000000) "></path>
        </g>
    </g>
</svg>


<!-- 不能正常使用的svg -->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="9px" viewBox="0 0 14 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <title>形状结合1</title>
    <g id="提报审批-H5" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="二级负责人/待二级审批/部门选择" transform="translate(-387.000000, -107.000000)" fill="#666666">
            <path d="M389,119 L389,117 L396.999,117 L397,109 L399,109 L398.999856,117.982838 C398.999952,117.988547 399,117.994268 399,118 L398.999,118.017 L399,119 L389,119 Z" id="形状结合1" transform="translate(394.000000, 114.000000) rotate(-135.000000) translate(-394.000000, -114.000000) "></path>
        </g>
    </g>
</svg>

两个文件只有位置的差别,但是生成了字体文件之后引入到页面中使用,chorme下会报出Failed to decode downloaded font错误,但是safari可以正常展示

from font-carrier.

yisibl avatar yisibl commented on August 21, 2024

SVG 初看下来太小了,调成 1024 以上
ttf 打包成 zip 上传

from font-carrier.

yifengwang66 avatar yifengwang66 commented on August 21, 2024

归档.zip
这里面是两个会导致问题的svg文件,以及由这两个svg打包出来的ttf文件
您说的svg太小了是说这个svg文件太小了吗,但是项目里有其他比这个svg更小的svg,那些svg打包出来没有出现这种问题

from font-carrier.

yisibl avatar yisibl commented on August 21, 2024

你升级一下 package.json 中的 svg2ttf 依赖,上游有调整,可能会解决这个问题。我暂时没有时间。

from font-carrier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.