开发者

Android: Show custom font in Graphical Layout tool

I've got custom fonts loading in my application just fine, but since I can开发者_StackOverflow中文版't see their position until I load up the application it's taking an exorbitant amount of time to get my display just right.

Is there any way to get the Graphical Layout tool in eclipse to display a custom font so I can position it there before running the application?


The eclipse layout editor uses the fonts provided by, and registered in, the android sdk platforms you have installed on your dev box. Therefore if you really must see your custom/non-standard font in the eclipse layout editor you can fiddle with the relevant platform font registry (see <android-sdk>\platforms\android-XX\data\fonts\system_fonts.xml).

I typically redefine the monospace and serif families (which I don't generally use) to reference the custom fonts I am using in the app. You can then reference the monospace and serif typefaces from your xml layouts and they'll be rendered in the eclipse layout editor using your custom/non-standard font.

DISCLAIMER: If you do this bad things can happen.


Sorry to say, but the answer is NO

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜