Skip to content

RichardBrown384/riscos-file-formats-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riscos-file-formats-js

About

Javascript library for reading RISC OS Draw, Font, and Sprite files.

Installation

npm install git+https://git@github.com/RichardBrown384/riscos-file-formats-js.git

Usage

To use in code

const {Draw, Sprite, FontOutlines} = require('riscos-file-formats');

const draw = Draw.fromUint8Array(array);
const sprite = Sprite.fromUint8Array(array);
const outlines = FontOutlines.fromUint8Array(array);

The library has some scripts that can be used convert files into either SVG or PNG.

draw:svg

To convert a Draw file to SVG you can use the following,

npm run draw:svg drawfile,aff drawfile.svg 

font:outline:svg

To convert a Font Outlines file to SVG you can use the following,

npm run font:outline:svg outlines,ff6 outlines.svg

sprite:png

To convert a Sprite file to PNGs you can use the following,

npm run sprite:png sprites,ff9

Project status

The library is provided on an as-is basis.


About

Library for loading RISC OS files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published