Today, I started to use Flash Builder 4.5 with the new 4.5 sdk. Before that, I used Flex Hero. After compiling my web application I realized that the fonts got thicker, just a bit thicker. I use the TLF which is originally embedded into the sdk.
I use cff embedded fonts. By the way it is helvetica. Any idea?
I am 100% sure that some change happened in TLF, because the fonts are stored in different swfs which were compiled a few month earlier.
And I am also having a strange issue with TLF when I am having EditManager. Look at the "benjaminbalazsisverystrange" text please.
The fonts were purchased from LinoType, so the file must be okay.
Hi:
Basically, TLF is text layout framework. It is focus on the layout business. That means TLF is not directly resposible for the font redering things. That's something flash player is resposible to do.
If you only updated the TLF, that should not make the font redering things to be different. You should check if you used different flash player.
Please refer to the following document's example:
And make sure you are using the embedded font correctly.
Thanks
Well, I was surprised as well. TLF has nothing to do with the rendering.
Flash player cannot make the difference, because we had an online version of the site which is still running and that still remains the same.
How I embedd the font is the classical way. I have a swf, its main class extends Font class. I load the font swf to the root swf and that's it.
I will try the example you sent me.
I just found what makes the difference.
the text gets thicker if you use:
_controller = new ContainerController(container, width, height);
_textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
_textFlow.renderingMode = RenderingMode.CFF;
it is the same if you use this:
_controller = new ContainerController(container, width, height);
_controller.fontLookup = FontLookup.EMBEDDED_CFF;
_controller.renderingMode = RenderingMode.CFF;
and keep the textflow fontLookUp and renderingMode non declared.
build number: "232 (759049)";
The output you get with the same SWF will vary depending on what version of Flash Player you are using. It is also possible that it might vary depending on what version of Flash Builder is used to embed the font. But I would guess there would be more changes that are Player dependent than changes that are Flash Builder dependent. It should be possible to see this by opening the same SWF on older and newer versions of Flash Player, and contrasting this with compiling a SWF on an older and new version of Flash Builder, and then opening it on the same Player. I know there were a lot improvements that went into the latest Player in text rendering.
- robin
We also noticed that the fonts look different too, just switching back to 19786 instead of 20967 will make the font thinner again. It's not related to the flash player as far as we can tell. There are other issues with font rendering in 20967 that we don't see in 19786 too (text disappearing and hangs related to the TLF code).
We don't set the rendering mode or font lookup anywhere.
One thing though is that 20967 compiles to swfVersion 11 whereas 19786 doesn't. Perhaps that change caused the flash player to render text differently? Passing in swfVersion 10 to 20967 just yield a blank application for us FYI.
I just made an example.
http://benji.hu/temp/tlf/bin-debug/Example.html
source: http://benji.hu/temp/tlf/example.zip
I have a class to create the field. The only difference is this.
if ( status ) {
_textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
_textFlow.renderingMode = RenderingMode.CFF;
} else {
_controller.fontLookup = FontLookup.EMBEDDED_CFF;
_controller.renderingMode = RenderingMode.CFF;
}
Hi:
I don't think the implementation of:
_controller.fontLookup = FontLookup.EMBEDDED_CFF;
_controller.renderingMode = RenderingMode.CFF;
will point to the real embedded font format.
Remember, the every element in TLF has two kinds of formats: Format and Computed format.
The Element's Format is describing formats set on this element. May be null.
And the Computed Format is describing the result of the inheritance cascade. What is really set.
Hi:
Based on our test, the embedded font works fine on TLF. Please make sure you are really using embedded font. One tip for this, please make sure your computed format really refer to the embedded font.
Another thing I wanted to mention is that the output you get with the same SWF will vary depending on what version of Flash Player you are using. TLF is text layout framework. We really do not response for the font redering business. We only response for the layout business. If you found the embedded font did not work as you expected, please post the issues on the player's forum. The really redering business is done by FTE(Flash Text Engine) which is in the flash player.
North America
Europe, Middle East and Africa
Asia Pacific