Immer wieder habe ich die Situation, dass ich in Flex eine bestimmte Schriftart einbetten möchte. Gute und einfache Lösungen sind recht schwer zu finden, obwohl immerwieder viele danach suchen.
Hier meine kleine Lösungshilfe:
Als erstes bettet man die Schriftart am besten mit eingeschränktem Zeichensatz ein, sonst verschwendet man ziemlich viel Speicher (Beispiel für swf Größenunterschied: 224kB oder 33 kB). Diese unicodeRange bezieht sich auf Buchstaben, Zahlen und einige gebräuchliche Sonderzeichen.
[code lang="as3"]
[Embed(systemFont="Helvetica", fontName="Helvetica",
mimeType="application/x-font",
unicodeRange="U+0040-U+00FF,U+0030-U+0039,U+003A-U+0040")]
private var FontHelvetica : Class;
[...]
public function registerFont():void {
Font.registerFont(FontHelvetica);
}
[/code]
Später im code setzt man dann einfach nur noch das Textformat:
[code lang="as3"]
var format : TextFormat = new TextFormat();
format.font = "Helvetica";
format.color = 0xFF00FF;
format.size = 10;
format.bold = true;
textfield.defaultTextFormat = format;
[/code]
Viel Spaß beim Weiterentwickeln.
Die neue SDK ist online. Es gab kleine Bugfixes, Sicherheits-Updates und einen weiteren Schritt in die neue Zertifizierungs-Richtung. Es diesem Grund kann es für bestehende Anwendungen wichtig sein einige Änderungen vorzunehmen, wenn sie 1.5.3 verwenden möchten.
If you have deployed an existing Adobe AIR application using AIR 1.5.2 or earlier and you want to update your application to use the 1.5.3 namespace, you will need to specify the old publisher ID of your application in your descriptor. Instructions on how to find your publisher ID and specify it in your descriptor are described in the release notes.
The process for changing certificates in an update to a deployed application has changed. Beginning with AIR 1.5.3, certificate renewals will no longer be handled automatically and you will need to use the migrate feature of ADT. Please learn more about this topic by reading the release notes.
Zu den wichtigeren Bugfixes gehören:
When an intermediate certificate expires, it is no longer possible to sign an application with a renewed certificate (fixed by removing the publisher ID).
The AIR application installer crashes on Linux systems using AMD Phenom processors.
Liste der behobenen Fehler:
| Bug # |
Bug title |
| 2411661 |
When an intermediate certificate expires, it is no longer possible to sign an application with a renewed certificate (fixed by removing the publisher ID) |
| 2464587 |
AIR application installer crashes on Linux systems using Phenom processors |
| 2421099 |
When the Mac Snow Leopard option is enabled to minimize the windows “behind” the application icon in the dock, applications that are maximized do not un-minimize the window |
| 2471920 |
HTMLLoader: KeyCodes are not transmitted well when using shift key inside an HTMLLoader |
| 2474555 |
In Linux, AIR applications open links in Firefox even if default browser is set to a different application |
Weitere Informationen: