https://github.com/jrmastermodelbuilder/matoran-alphabet
Package for drawing Matoran alphabet characters
https://github.com/jrmastermodelbuilder/matoran-alphabet
Last synced: about 1 year ago
JSON representation
Package for drawing Matoran alphabet characters
- Host: GitHub
- URL: https://github.com/jrmastermodelbuilder/matoran-alphabet
- Owner: JrMasterModelBuilder
- License: mpl-2.0
- Created: 2021-03-04T04:51:29.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T04:09:31.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T05:51:12.433Z (about 1 year ago)
- Language: TypeScript
- Size: 809 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# matoran-alphabet
Package for drawing Matoran alphabet characters
[](https://npmjs.com/package/matoran-alphabet)
[](https://nodejs.org)
[](https://packagephobia.now.sh/result?p=matoran-alphabet)
[](https://npmcharts.com/compare/matoran-alphabet?minimal=true)
[](https://github.com/JrMasterModelBuilder/matoran-alphabet/actions/workflows/main.yml)
# Overview
Currently supports drawing multiple different character styles as SVG code.
# Usage
## Basic Usage
```js
import {CharactersRound, SvgEncoder} from 'matoran-alphabet';
const characters = new CharactersRound();
const svg = new SvgEncoder(characters);
console.log(svg.encode('A'));
```
## Characters Styles
Multple styles are available.
- `CharactersRound`
- `CharactersHex1`
- `CharactersHex2`
## Line Stroke and Margins
The stroke and marign around the characters can be adjusted.
```js
characters.stroke = 16;
characters.margin.top = 2;
characters.margin.right = 4;
characters.margin.left = 6;
characters.margin.bottom = 8;
```
# SVG Options
The SVG code can be customized.
```js
svg.header = '\n';
svg.svgAttrs['xmlns:svg'] = 'http://www.w3.org/2000/svg';
svg.pathAttrs.stroke = '#808080';
svg.prepend = '';
svg.append = '';
```
# Bugs
If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.
# License
Copyright (c) 2021-2023 JrMasterModelBuilder
Licensed under the Mozilla Public License, v. 2.0.
If this license does not work for you, feel free to contact me.