All Projects → vincent7128 → text-image

vincent7128 / text-image

Licence: MIT license
Convert text to image https://vincent7128.github.io/text-image/

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to text-image

ogrep-rs
Outline grep — search in indentation-structured texts (Rust version)
Stars: ✭ 32 (-50%)
Mutual labels:  text
mg
OpenBSD Mg editor. Portable Public Domain Micro Emacs for *BSD, Cygwin, Linux, Mac OS X.
Stars: ✭ 99 (+54.69%)
Mutual labels:  text
RAE
基于tensorflow搭建的神经网络recursive autuencode,用于实现句子聚类
Stars: ✭ 12 (-81.25%)
Mutual labels:  text
react-native-styled-text
Styled Text for React Native
Stars: ✭ 57 (-10.94%)
Mutual labels:  text
aframe-bmfont-text-component
A-Frame component for rendering bitmap fonts.
Stars: ✭ 62 (-3.12%)
Mutual labels:  text
text-classification-baseline
Pipeline for fast building text classification TF-IDF + LogReg baselines.
Stars: ✭ 55 (-14.06%)
Mutual labels:  text
regXwild
⏱ Superfast ^Advanced wildcards++? | Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET via Conari (with caching of 0x29 opcodes +optimizations) etc.
Stars: ✭ 20 (-68.75%)
Mutual labels:  text
edits.cr
Edit distance algorithms inc. Jaro, Damerau-Levenshtein, and Optimal Alignment
Stars: ✭ 16 (-75%)
Mutual labels:  text
link text
Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links
Stars: ✭ 20 (-68.75%)
Mutual labels:  text
Compressed2TXT
File(s)/Folder(s) "Send to" menu .bat ascii encoder with optional password and makecab lzx compression
Stars: ✭ 156 (+143.75%)
Mutual labels:  text
dobbi
An open-source NLP library: fast text cleaning and preprocessing
Stars: ✭ 21 (-67.19%)
Mutual labels:  text
textics
📉 JavaScript Text Statistics that counts lines, words, chars, and spaces.
Stars: ✭ 36 (-43.75%)
Mutual labels:  text
rake new2
A Python library that enables smooth keyword extraction from any text using the RAKE(Rapid Automatic Keyword Extraction) algorithm.
Stars: ✭ 23 (-64.06%)
Mutual labels:  text
probabilistic nlg
Tensorflow Implementation of Stochastic Wasserstein Autoencoder for Probabilistic Sentence Generation (NAACL 2019).
Stars: ✭ 28 (-56.25%)
Mutual labels:  text
text-sdk-php
PHP SDK to send messages with CM.com
Stars: ✭ 18 (-71.87%)
Mutual labels:  text
Thirukkural-Tamil-Dataset
திருக்குறள் by திருவள்ளுவர்.
Stars: ✭ 44 (-31.25%)
Mutual labels:  text
instagram-text-editor
An Instagram like text editor Flutter widget that helps you to change your text style.
Stars: ✭ 66 (+3.13%)
Mutual labels:  text
table
Produces a string that represents slice data in a text table, inspired by gajus/table.
Stars: ✭ 130 (+103.13%)
Mutual labels:  text
privacy-policy-template
Privacy Policy Template for website or app
Stars: ✭ 64 (+0%)
Mutual labels:  text
RubyTextMeshPro
Unity Text Mesh Proでルビ(フリガナ)のタグを追加しました.
Stars: ✭ 61 (-4.69%)
Mutual labels:  text

Text Image

About

📺 Live Demo
Convert text to image. Work with unicode and web font like FontAwesome, you can use emoji too. 🚀

Usage

NPM:

npm install text-image

CDN:

<script src="https://cdn.jsdelivr.net/npm/text-image/dist/text-image.js"></script>

Code example:

// create new TextImage object
var textImage1 = TextImage();

// create new TextImage object with customize style
var style = {
    font: 'serif',
    align: 'center',
    color: 'red',
    size: 18,
    background: 'white',
    stroke: 1,
    strokeColor: 'rgba(0, 0, 0, 0)',
    lineHeight: '1.6em',
    bold: true,
    italic: true
};
var textImage2 = TextImage(style);

// convert text message to image element
var img = textImage.toImage('MESSAGE');

// convert text message to base64 dataURL
var data = textImage.toDataURL(message);

// change style
textImage.setStyle(style);

Style object

The default style object

{
    font: 'Sans-serif',
    align: 'left',
    color: '#000000',
    size: 16,
    background: 'rgba(0, 0, 0, 1)',
    stroke: 0,
    strokeColor: '#FFFFFF',
    lineHeight: '1.2em'
}

font

The font property like css font-family and you can use web fonts like FontAwesome.

align

The align property specifies the horizontal alignment of text, use 'left', 'center' or 'right'.

color & background & strokeColor

The color, background and strokeColor property like css color.

/* <named-color> values */
color: 'red'
color: 'orange'
color: 'tan'
color: 'rebeccapurple'

/* <hex-color> values */
color: '#090'
color: '#009900'
color: '#090a'
color: '#009900aa'

/* <rgb()> values */
color: 'rgb(34, 12, 64, 0.6)'
color: 'rgba(34, 12, 64, 0.6)'
color: 'rgb(34 12 64 / 0.6)'
color: 'rgba(34 12 64 / 0.3)'

/* <hsl()> values */
color: 'hsl(30, 100%, 50%, 0.6)'
color: 'hsla(30, 100%, 50%, 0.6)'
color: 'hsl(30 100% 50% / 0.6)'
color: 'hsla(30 100% 50% / 0.6)'

size & stroke

The size and stroke property is the text size and outline width, only use numbers.

lineHeight

The lineHeight property like css line-height.

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].