.
What is the font ‘starling true type Verdana’? Is it universal across all platforms?
.
starling TextFormat
setTo() method
font:String (default = Verdana )
.
The default font is “Verdana”,
May I ask if the ‘Verdana’ font is universal across all targets?
.
In “html5canvas”, the default font is “sans serif”,
When using the default font ‘sans serif’,
Using the default font of the current system,
Is’ Verdana ‘in’ starling 'also used for the same purpose?
I would like to use the default font on the current system to display text
Does’ openfl 'support this method?
Verdana is a font that is available on most operating systems by default, or there may be an appropriate fallback. It’s a safe choice for Adobe AIR and Flash Player.
However, OpenFL doesn’t necessarily allow you to use non-embedded fonts on all targets (they should be available on the HTML5 target, but not necessarily native targets). With that in mind, Verdana might not actually be the best choice for the Haxe version of Starling as a default.
If you want to safely choose a sans-serif true-type font, then using the font name _sans is recommended for both OpenFL and Starling.
good
By the way, what bird is in the red bird icon of “Starling”?
Starling is a type of bird. I’m not sure if there are any starlings that are red like that, though. It’s possible that Daniel Sperl chose red because the logos of Flash Player and AIR are red.
A common starling.
Found natively in Europe, but introduced in other parts of the world, including USA, Canada and Australia.
They have a nice song. I’ve often thought they’re a bit like the R2-D2 of the bird kingdom.
Daniel Sperl had also first created the Sparrow Framework (Aug 2009), before the Starling Framework (Jul 2011). I’ve never used Sparrow Framework, but the two frameworks have some things in common, including the bird theme, and their texture atlas formats.
So Starling was a continuation of that theme. The blue bird for Sparrow Framework, the red for Starling Framework.
Good morning
I’m glad to see your reply,
Thanks for the explanation
Why did the author use a bird theme?
Does the author really like birds?
I’m quite curious
That’s probably something that you would need to ask the author directly.
I’m just asking out of curiosity. By the way, in the goal of “openfl html5”, even if it’s an empty project, the exported “. js” has “3mb”. I was wondering if it’s possible to optimize it, for example, only the “classes” that are used will be compiled, and the “classes” that are not used don’t need to be compiled into “. js”? Just talking casually, we still need to rely on the team to make contributions
I embedded a ‘. ttf’ font, but when I checked the exported font folder, I found multiple font files in different formats. Can I set to reduce the generation of font files in these formats?
The ttf is converted to web friendly woff and woff2 formats. While multiple formats are made available, a client will use only the best option it supports. So if the client supports woff2, it’ll only download that one.
Edited by future me: woff2 is actually not currently generated by Lime
That’s a question that’s been raised a few times in the community. Something to note, is web-servers typically employ compression without you needing to do anything special. The two common forms are Gzip and Brotli, with Brotli being the newer and generally superior.
With the standard build:
openfl build html5
Compressing the resulting 3.1MB js file with web-like compression squashes it down to:
- Gzip 493KB
- Brotli 360KB
You might also use the -final flag when building for your html5 target, to optimise it. It’ll take longer, but it makes a big difference. Just be careful to test, as sometimes this may have some consequences (such as when using reflections and dynamic references in your code).
openfl build html5 -final
That alone reduces a 3.1MB file down to 1.1MB in my testing.
Compressed, that 1.1MB file becomes:
- Gzip 255KB
- Brotli 203KB
Results may vary from web-server to web-server, as different compression level settings can be defined. The above were simply the gzip and brotli defaults on my system (no specified compression level).
Actually just to correct myself a bit there, woff2 files aren’t generated.
I use a custom build script that generates the woff2 files using the official woff2 tool, and includes them in the output html.
.
as sometimes this may have some consequences (such as when using reflections and dynamic references in your code).
.
The “. js” file I compiled using “openfl build html5 final” is “1mb”,
But I noticed that the use of ‘- Final’ compilation caused the problem you mentioned earlier?
.
You may be able to resolve those issues by approaching your code solution a bit differently.
The multi format font discussed above should have been designed by “openfl” to be compatible with more platforms, but the platform I uploaded only supports the “. ttf” format, and other font files were filtered out after uploading to the platform




