gregoiresage / fitfont Goto Github PK
View Code? Open in Web Editor NEWCustom font module for Fitbit OS
License: MIT License
Custom font module for Fitbit OS
License: MIT License
Perhaps an unusual usage, and can be worked around, but is unexpected behaviour.
I've wanted to add this library to my Fitbit project, but I run into several problems:
When I run npm i fitfont
, I get asked "Copy gui files in your resources folder?", I say yes, it creates the fitfont.gui file, but the install never finishes (does the same if I say no). This happens on Windows 10. When I press CMD+C, I get an error saying I miss fp-ts
and gulp-zip
dependencies. I install these manually, run the command to generate fonts, but I get an error again. After searching in Google, it turns out Windows has some permission problems with running Python.
Well lucky me, my working laptop is a Macbook, so I tried to generate the font images there.
The errors are much more informative: first, I was missing Xcode. Ok, after installing, and running the generating command, I get this error: ModuleNotFoundError: No module named 'PIL'
I'm totally stuck here. I never worked with Python, don't know how to solve this :/
Ran npm i fitfont in my directory of my project and there's no prompt for copying gui files to my resources folder, what am I doing wrong?
How do I calculate the width of the text like I would with myText.getBBox().width
or myText.width
?
Any chance of adding the ability to set a scaling for the characters? I understand this would lead to pixelation when zoom factor gets large, but this could be a nice option to avoid the need to export fonts to multiple sizes.
Just to improve the README if you want to add this.
const myLabel = new FitFont({
id:'myLabel', // id of your symbol in the index.gui, you can also give an element object e.g. id: document.getElementById('foo')
font:'Market_Saturday_200', // name of the generated font folder < we need a comma here
// Optional
halign: 'start', // horizontal alignment : start / middle / end
valign: 'baseline', // vertical alignment : baseline / top / middle / bottom
letterspacing: 0 // letterspacing...
})
Steps to reproduce:
App: Char not found in Random_Font_30
In the latest version, 1.3.0, this error is being thrown when trying to generate files. Tried updating Python but no luck. Running on Windows 10.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.