我现在完全不知所措……
我一直在尝试将此字体嵌入到我的Flex移动应用程序中:
http://www.font-zone.com/download.php?fid=111
但由于某种原因,它不会显示出来,它只是恢复为默认字体……我尝试过的所有自定义字体都有相同的问题,只有一种:
http://www.fonts101.com/fonts/view/Uncategorized/28299/Slider
下面是我使用的代码:
global
{
font-family: bank-gothic-medium-bt;
}
@font-face
{
fontFamily: bank-gothic-medium-bt;
src: url("D:\Users\Oisin\Pictures\MW3 Builder\bank-gothic-medium-bt.ttf");
embedAsCFF: true;
}我尝试了多种字体,以及带有单一名称的字体(我认为这可能是问题所在),但仍然一无所获。
任何帮助都将不胜感激。
谢谢!
发布于 2012-09-20 02:10:08
啊哈!明白了..。
对于其他有这个极其荒谬的问题的人来说...
Ensure your font is BOLD!默认情况下,按钮使用粗体,即使我尝试将字体粗细(fontWeight-weight)指定为正常,它也不起作用。
现在我可以真正开始使用app.....phew了!
谢谢你们的回答,各位!
发布于 2012-09-19 00:31:21
这可能是两件事:
@font-face { src: url("assets/fonts/BebasNeue.otf");fontFamily:"BebasNeueEmbedded";embedAsCFF: true;}
.progressMeterText { fontFamily: BebasNeueEmbedded;fontLookup: embeddedCFF;color:#828282;fontSize: 18pt;}
如果格式显示不正确,我深表歉意。编辑器似乎不想接受这种格式。
发布于 2012-09-19 23:39:18
也许这会对你有所帮助:
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
textLayoutFormat.renderingMode = RenderingMode.CFF;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontFamily = "CUSTOM_FONT_FAMILY";
textLayoutFormat.fontSize = 14;
var uic:UIComponent = UIComponent(FlexGlobals.topLevelApplication);
_textFlow.flowComposer.swfContext = ISWFContext(uic.getFontContext(textLayoutFormat.fontFamily, false, false, true));
IEditManager(_textFlow.interactionManager).applyFormatToElement(_textFlow,textLayoutFormat);
_textFlow.flowComposer.updateAllControllers();具体来说,下面两行是解决方案:
var uic:UIComponent = UIComponent(FlexGlobals.topLevelApplication);
_textFlow.flowComposer.swfContext = ISWFContext(uic.getFontContext(textLayoutFormat.fontFamily, false, false, true));https://stackoverflow.com/questions/12468291
复制相似问题