https://fontstruc.github.io/fonthx/
Clone ce repo avec Git dans un dossier sur votre machine
git clone [email protected]:FontStruct/fonthx.git
Installez haxe, par exemple de https://haxe.org/download/
Prend actuellement en charge Haxe 4.2 (si sur HAxe 3.4 Utilisez TAG 0.04)
Installer des dépendances haxe
Avec lix (préféré):
lix download
Avec Haxelib (toute personne qui installe avec Hoxelib devrait d'abord vérifier ce problème)
haxelib install haxelib.json
Construire:
haxe build/examples/pixelfonter/pixelfonter-node.hxml
Cela créera l'exemple Pixelfonter, qui créera une police TrueType à partir d'une image PNG.
Maintenant courir:
node dist/examples/pixelfonter/node/PixelFonterApp.js -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf
Construire:
haxe build/examples/pixelfonter/pixelfonter-java.hxml
Courir:
java -jar dist/examples/pixelfonter/java/PixelFonterApp.jar -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf
Ou, pour une police avec des contours CFF:
java -jar dist/examples/pixelfonter/java/PixelFonterApp.jar -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.otf -f otf
Construire:
haxe build/examples/pixelfonter/pixelfonter-cpp.hxml
Courir:
dist/examples/pixelfonter/cpp/PixelFonterApp -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf
Afin de construire et d'exécuter cet exemple sur OSX ou Linux, vous devrez installer mono, par exemple via Brew Install Mono
Construire:
haxe build/examples/pixelfonter/pixelfonter-cs.hxml
Courir:
mono dist/examples/pixelfonter/cs/bin/PixelFonterApp.exe -i build/examples/pixelfonter/pixel-font-5x5.png -c65-91 -o tmp/pixelfont.ttf
haxe build/examples/pixelfonter/pixelfonter-js.hxml
- Afin de visualiser cet exemple, vous devrez pointer un serveur Web à Dist / Exemples / Pixelfonter / JS / index.html
C'est compliqué et instable - une aventure.
HXCWD=`pwd` haxe build/examples/pixelfonter/pixelfonter-wasm.hxml
- Vous devrez configurer EMScripten afin de compiler celui-ci. Vous devrez également pointer un serveur Web à Dist / Exemples / Pixelfonter / WasM / index.html. Le moyen le plus simple est avec Emrun, par exemple
emrun --no_emrun_detect --browser chrome dist/examples/pixelfonter/wasm/PixelFonterBrowserApp-debug.html
(Pourrait bien prendre un certain temps pour initialiser)
Configurez les outils de développement (Gulp):
npm install gulp-cli -g
npm install
Exécuter des spécifications:
gulp specs
Ou, développer et exécuter des spécifications:
gulp specs-watch
Développez à l'aide de l'application Pixelfonter Example (Node Target):
gulp pixelfonter-watch
Montrez toutes les tâches de gorgée disponibles:
gulp --tasks
Regardez l'exemple Pixelfonter pour guider, en particulier Pixelfonter
Vous devez: