我发现上述方法并不总是有效。也就是说,我在 Windows 7 机器上的 CS5 中嵌入了“Helvetica Neue LT Std 55 Roman”。在字体查看对话框中,显示以下内容:
Font Name: Helvetica Neue LT Std 55 Roman
Vendor ID: ADBE
Copyright © 1988, 1990, 1993, 2002 Adobe Systems Incorporated. All Rights Reserved.
http://www.adobe.com/type/legal.html
在 css 中使用该字体名称失败。为了获取字体的 Flash 值,我使用了以下内容:
var fonts:Array = Font.enumerateFonts();
for (var i:int = 0; i < fonts.length; i++)
{
var font:Font = (fonts[i] as Font)
trace(font.fontName, ",", font.fontStyle, ",", font.fontType)
}
font.fontName 是你的css中的字体系列,font.fontStyle 将是字体粗细或字体样式,具体取决于。
出于好奇,对我来说显示的值是:“HelveticaNeueLT Std,常规,嵌入式”