我正在使用flex的RichEditableText,我想在RichEditableText中嵌入我自己的字体,所以我给了fontLookUp=EMBEDD_CFF,它仍然没有采用我的嵌入字体,以及如何在这个RichEditableText中使用文本流。
发布于 2017-02-06 19:05:45
请看下面在RichEditableText中使用嵌入式字体的代码。
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo">
<s:layout>
<s:BasicLayout />
</s:layout>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/halo";
@font-face {
src: url("assets/ACaslonPro-Regular.otf");
fontFamily: "ACaslonProRegularEmbedded";
embedAsCFF: true;
}
s|RichEditableText {
fontFamily: ACaslonProRegularEmbedded;
fontLookup: embeddedCFF;
fontSize: 34;
}
</fx:Style>
<s:RichEditableText id="textView"
text="The quick brown fox jumped over the lazy dog. 01234567890"
width="400"
horizontalCenter="0"
verticalCenter="0" />
</s:Application>
https://stackoverflow.com/questions/42060850
复制相似问题