Flash CS5 中的字体渲染错误?

发布于 2024-10-30 00:40:26 字数 1847 浏览 1 评论 0原文

我的项目中突然遇到字体渲染错误。

下图是一个带有纹理和 2 个动态文本字段作为子项的方形精灵。

在此处输入图像描述

文本本身是正确的。底部字段是 32 位十六进制颜色(“H: 0xFFFFF4A1”),但正如您所看到的,某些字符被拉伸(“x”、“4”和“1”)。第一个文本字段也是如此,它以 ARGB 格式列出每种颜色。

使用的字体是 Myriad Pro Condensed。我最初使用的是 Myriad Pro Bold Condensed,我已经使用了几个月,但昨天突然,该字体变得比此处可见的更疯狂,所以我换了。现在这个字体也被错误地渲染。

我已经验证了字体。

我已经删除了我的 ASO 文件。

我在父精灵对象上使用cacheAsBitmapMatrix,但cacheAsBitmapMatrix应该只影响移动设备,所以我不确定为什么它会在我的桌面上的ADL下运行时呈现这样的字体(如果这是问题)。

newSwatch.cacheAsBitmapMatrix = new Matrix();
newSwatch.cacheAsBitmap = true;

这就是我调用嵌入在我的库中的字体的方式。

//Create Text Field
private function swatchTextField():TextField
    {
    var myFont:Font = new MyFont();

    var textFormat:TextFormat = new TextFormat();
    textFormat.bold = true;
    textFormat.color = 0xFFFFFF;
    textFormat.font = myFont.fontName;
    textFormat.size = swatchSize / 10;

    var result:TextField = new TextField();
    result.antiAliasType = AntiAliasType.ADVANCED;
    result.blendMode = BlendMode.ERASE;
    result.autoSize = TextFieldAutoSize.LEFT;
    result.defaultTextFormat = textFormat;
    result.embedFonts = true;
    result.multiline = true;
    result.selectable = false;
    result.type = TextFieldType.DYNAMIC;

    return result;
    }

我不知道还能做什么。如果我切换到另一种字体,它可能会再次混乱。当我单击对象时,它会放大。在放大时,它也会旋转一点。这样做时我可以看到字体错误略有变化。我几乎确信这是 cacheAsBitmapMatrix 的问题,但即使从代码中删除该错误,该错误仍然存​​在。

这是具有不同旋转的同一对象:

在此处输入图像描述

任何线索都将不胜感激!


更新:

这个错误确实不是Flash的问题,而是Apple在Mac OS X 10.6.7中引入的一个错误,影响了一些开放式字体的显示和打印。该错误已得到解决,现在可以下载修复程序:http://support.apple.com /kb/HT4605

i'm suddenly experiencing errors in font rendering in my project.

the following image is a square sprite with a texture and 2 dynamic text fields as children.

enter image description here

the text itself is correct. the bottom field is a 32-bit hexadecimal color ("H: 0xFFFFF4A1"), but as you can see some of the characters are stretched ("x", "4" and "1"). it's the same in the first text field which lists each color in ARGB format.

the font being used is Myriad Pro Condensed. i was originally using Myriad Pro Bold Condensed, which i was using for months, but suddenly yesterday the font became even crazier than what's visible here so i switched. now this font is being rendered incorrectly also.

i've validated the fonts.

i've deleted my ASO files.

i'm using cacheAsBitmapMatrix on the parent sprite object, but cacheAsBitmapMatrix is suppose to only affect mobile devices so i'm not sure why it would be rendering the font like this (if it's the problem) while running under ADL on my desktop.

newSwatch.cacheAsBitmapMatrix = new Matrix();
newSwatch.cacheAsBitmap = true;

this is how i'm calling the font, which is embedded in my library.

//Create Text Field
private function swatchTextField():TextField
    {
    var myFont:Font = new MyFont();

    var textFormat:TextFormat = new TextFormat();
    textFormat.bold = true;
    textFormat.color = 0xFFFFFF;
    textFormat.font = myFont.fontName;
    textFormat.size = swatchSize / 10;

    var result:TextField = new TextField();
    result.antiAliasType = AntiAliasType.ADVANCED;
    result.blendMode = BlendMode.ERASE;
    result.autoSize = TextFieldAutoSize.LEFT;
    result.defaultTextFormat = textFormat;
    result.embedFonts = true;
    result.multiline = true;
    result.selectable = false;
    result.type = TextFieldType.DYNAMIC;

    return result;
    }

i don't know what else to do. if i switch to another font it will probably just mess up again. when i click on the object it zoomed in. while zooming in it also rotates a bit. while doing so i can see the font errors are slightly changing. i'm almost convinced it's a problem with cacheAsBitmapMatrix, but the error still persistas even removing that from the code.

here's the same object with a different rotation:

enter image description here

any clues at all would be greatly appreciated!


UPDATE:

this error was indeed not a problem with Flash but a bug Apple introduced in Mac OS X 10.6.7 that affected the display and printing of some open-type fonts. the bug has since been addressed and a fix is now available for download: http://support.apple.com/kb/HT4605

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

太阳哥哥 2024-11-06 00:40:26

你用的是Mac吗?这可能会对您有所帮助:

有关该问题的 Adob​​e 错误

升级到 Mac OSX 10.6 后。 7、一些用户遇到了许多不同 OpenType 字体的字体渲染问题。 Flash CS5 及更早版本中会出现此问题。

Are you using a mac? This might help you:

Adobe bug about the issue

After upgrading to Mac OSX 10.6.7, some users are encountering font rendering issues with many different OpenType fonts. This issue occurs in Flash CS5 and earlier.

冷心人i 2024-11-06 00:40:26

这是 Mac/Flash CS5 的错误。

要解决此问题,您需要关闭 Flash 并重新打开它。该错误可能会消失。如果没有,经过几次尝试后,您需要降级到 OSX 10.6.6。

请参阅下面的链接(@redHouse71)

It's a Mac/Flash CS5 bug.

To resolve it, you need to close Flash and re-open it. The bug may disappear. If not, after few try, you need to downgrade to OSX 10.6.6.

See the link below (of @redHouse71)

甜是你 2024-11-06 00:40:26

我也遇到过这种情况,但我发现只需重新启动我的 Mac 即可解决该问题。我正在将我的一个 Air 应用程序移植到 Android 平板电脑上,当 Mac 运行时它实际上会做同样的事情。

只是想我会把这个添加进去。

This has happened to me but I found a simple restart of my mac solves it. I am porting one of my air apps to an android tablet and it actually does the same thing when the mac is playing up.

Just thought I would add this in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文