https://github.com/craiggleso/msdf-pbf
Compress msdf data into a protobuf and back again.
https://github.com/craiggleso/msdf-pbf
msdf pbf protobuf sdf webgl
Last synced: 3 months ago
JSON representation
Compress msdf data into a protobuf and back again.
- Host: GitHub
- URL: https://github.com/craiggleso/msdf-pbf
- Owner: CraigglesO
- License: isc
- Created: 2020-01-30T00:10:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T06:01:51.000Z (over 2 years ago)
- Last Synced: 2025-02-05T19:05:42.087Z (4 months ago)
- Topics: msdf, pbf, protobuf, sdf, webgl
- Language: JavaScript
- Size: 902 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# msdf-pbf [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [](https://standardjs.com)
[travis-image]: https://travis-ci.org/regia-corporation/msdf-pbf.svg?branch=master
[travis-url]: https://travis-ci.org/regia-corporation/msdf-pbf
[npm-image]: https://img.shields.io/npm/v/msdf-pbf.svg
[npm-url]: https://npmjs.org/package/msdf-pbf
[downloads-image]: https://img.shields.io/npm/dm/msdf-pbf.svg
[downloads-url]: https://www.npmjs.com/package/msdf-pbf## About
**Create new modules with this skeleton**
```sh
# grab the package
git clone https://github.com/Regia/msdf-pbf.git
# remove the origin
git remote rm origin
# download the dependencies
yarn
```### Example use
```js
// ES6
import buildFonts from 'msdf-pbf'
// ES5
const buildFonts = require('msdf-pbf').defaultconst fonts = [
{ name: 'robotoRegular', file: './testFonts/Roboto-Regular.ttf' },
{ name: 'robotoMedium', file: './testFonts/Roboto-Medium.ttf' }
]buildFonts(fonts, './fontPack.pbf', { compress: true })
```
---
## ISC License (ISC)
Copyright 2019
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
Copyright (c) 1995-2003 by Internet Software ConsortiumPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.