Code Monkey home page Code Monkey logo

text2svg's Introduction

v-text2svg

一个将文字转为 svg 图片的 vue 插件/A Vue plugin that converts text into SVG images

Install

npm install v-text2svg

Quick Start

// main.js
import text2svg from 'v-text2svg'

Vue.use(text2svg)

// other.vue
<div v-text2svg="{ content: 'Hello World!', options: { fontSize: 100 } }"></div>

Options

Currently, only these options are supported, and the visible height and width of the container will be read internally. If not, it will be searched for at the parent level

  • fontSize 字体大小
  • fontWeight 文字粗细
  • fontFamily 文字字体
  • color 文字颜色

LICENSE

MIT

text2svg's People

Contributors

fang-weilin avatar

Stargazers

 avatar

Watchers

 avatar

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.