This allows us to upgrade freetype beyond 2.9.1 (actually, 2.8.1 due to a bug in freetype 2.9) without wildly different font metrics. The reason that we don't want to change font metrics algorithms is that freetype's new algorithm is very different than the algorithm used for SWF fonts. The older freetype algorithm is closer to SWF, so we want to stick with it. Thankfully, freetype supports accessing various metrics stored in font files in a more raw form, so we can provide our own custom algorithm in a way that is fully supported by freetype. I just copied the existing algorithm straight from 2.9.1 to restore our preferred behavior. I confirmed that, after this change, OpenFL renders metrics like Lime 8.1.3. But we have the same upgraded freetype as Lime 8.2.0 that we had to revert for 8.2.1. I plan to experiment with a mode that matches SWF even more closely, now that I have a better understanding of how fonts and freetype work.
Lime
Lime is a flexible, lightweight layer for Haxe cross-platform developers.
Lime supports native, Flash and HTML5 targets with unified support for:
- Windowing
- Input
- Events
- Audio
- Render contexts
- Network access
- Assets
Lime does not include a renderer, but exposes the current context:
- Cairo
- Canvas
- DOM
- Flash
- GL
The GL context is based upon the WebGL standard, implemented for both OpenGL and OpenGL ES as needed.
Lime provides a unified audio API, but also provides access to OpenAL for advanced audio on native targets.
License
Lime is free, open-source software under the MIT license.
Installation
First, install the latest version of Haxe.
Then, install Lime from Haxelib and run Lime's setup command.
haxelib install lime
haxelib run lime setup
Development Builds
When there are changes, Lime is built nightly. Builds are available for download here.
To install a development build, use the "haxelib local" command:
haxelib local lime-haxelib.zip
Building from Source
-
Clone the Lime repository, as well as the submodules:
haxelib git lime https://github.com/openfl/lime -
Install required dependencies:
haxelib install format haxelib install hxp -
Copy the ndll directory from the latest Haxelib release, or see project/README.md for details about building native binaries.
-
After any changes to the tools or lime/tools directories, rebuild from source:
lime rebuild tools -
To switch away from a source build:
haxelib set lime [version number]
Sample
You can build a sample Lime project with the following commands:
lime create HelloWorld
cd HelloWorld
lime test neko
You can also list other projects that are available using "lime create".
Targets
Lime currently supports the following targets:
lime test windows
lime test mac
lime test linux
lime test android
lime test ios
lime test html5
lime test flash
lime test air
lime test neko
lime test hl
Desktop builds are currently designed to be built on the same host OS