在 Sketch 中畫圖標,生成字體文件

jopen 8年前發布 | 22K 次閱讀 Using icon font for multiple platforms

Using icon font for multiple platforms

 我們經常會在項目中使用 Icon Font,比如 Font Awesome。最近做一個項目,你可以自己在 Sketch 中畫圖標,生成字體文件,然后在 Web, Android ,iOS 等各個平臺中使用。項目配有簡單明了的各個平臺下的例子。
This project can make icon font files from Sketch file.

These font files can be used in Web, Android and iOS.

This project also demos how to use the font files on these platforms.

Requirements

  • Mac
  • Skecth
  • npm

How to use

  1. Clone or download this project

  2. Install

    sh manage.sh install

  3. Make icon font from Skecth file

    sh manage.sh make

    cube-icons-sample.sketch is a sample Skecth file, you can change your own one.

  4. See what we have

    1. Web

      You can open samples/web/index.html in your browser, then you will see all the icons.

      You also can open it by:

      sh manage.sh open
    2. iOS project

      You can open XCode sample proejct under dirctory: samples/ios

    3. Android proejct

      You can open Android Studio sample proejct under dirctory: samples/android

    4. </ol> </li> </ol>

      Customize

      1. You can edit gulpfile.js to:

        1. Use you own Sketch icon file.

        2. Change the name of the icon files.

        3. Change the css class name.

        4. Other things you want.

        5. </ol> </li>

        6. All the files under dirctory dist/ are generated by gulpfile.js according the file under dirctory '/templates'

          If can customize your own template files if you want.

        7. </ol>

          License

          MIT

          Thanks

          This project is mainly based on https://github.com/cognitom/symbols-for-sketch.



          項目地址: https://github.com/liaohuqiu/icon-font-for-multiple-platforms

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!