font

Java2D Graphics anti-aliased

匿名 (未验证) 提交于 2019-12-03 01:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to Java and trying to use Java2D Graphics to create a Image. But the output is coming as anti-aliased. I tried many ways to rectify it but doesn't work. The characters are getting distorted or jagged. public BufferedImage createNameOnButton(String label) { int messageWidth = 0; Font font = new Font("Arial", Font.PLAIN, 11); BufferedImage bi = new BufferedImage( 10, 10, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = (Graphics2D) bi.getGraphics(); g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)

Font Awesome fonts show up as boxes on IE8

匿名 (未验证) 提交于 2019-12-03 01:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I am using Font Awesome in a project and in testing I'm running into issues with IE8. On Windows IE9, Chrome and Firefox show the font properly (As does Firefox, Chrome and Safari on OS X) but IE8 on Windows has a problem where I get a box in place of the font. My code is: Site title I have the four font files... fontawesome-webfont.eot fontawesome-webfont.svg fontawesome-webfont.ttf fontawesome-webfont.woff ...where they belong and they are readable by the world (755 permissions). What am I missing? Do I have to do something with

Setting styles in Openpyxl

匿名 (未验证) 提交于 2019-12-03 01:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need advice on setting styles in Openpyxl. I see that the NumberFormat of a cell can be set, but I also require setting of font colors and attributes (bold etc). There is a style.py class but it seems I can't set the style attribute of a cell, and I don't really want to start tinkering with the openpyxl source code. Has anyone found a solution to this? 回答1: As of openpyxl version 1.5.7, I have successfully applied the following worksheet style options... from openpyxl.reader.excel import load_workbook from openpyxl.workbook import Workbook

How to set custom font for a whole application in Android?

匿名 (未验证) 提交于 2019-12-03 01:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to set a custom font in an Android application? I tried what is posted here , but I don't know where my extends Application class is... Any help? EDIT: I tried the following: Add an assets folder and insert the font inside as seen here: Add a new class that extends from Application Call this new class from my AndroidManifest.xml . I went to my style and added it. MyApp.java: public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); FontsOverride.setDefaultFont(this, "DEFAULT", "raleway

Why font-awesome works on localhost but not on web ?

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using font awesome in my project (mvc/asp.net) . My problem is, I was debugging the project and check on localhost , there was no problem with font awesome icons. But when published the website and check on web, instead of icons, i saw small boxes. I'm sure that it's placed in right directory(where css files placed). I couldn't find any proper solution. By the way there is also no problem with buttons. They are all ok but icons are gone. Thanks 回答1: I've just loaded your webpage and checked the net tab of firebug. your following urls

Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am doing assets pre-compile, and running the application in production mode. After compilation when I load the my index page I got followings warnings in the chrome console: Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.ttf?v=2.0.0 prospects:1 OTS parsing error: invalid version tag Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.woff?v=2.0.0 prospects:1 OTS parsing error: invalid version tag The issue is its not loading icons instead of that its showing squares . we used the custom fonts and

Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am doing assets pre-compile, and running the application in production mode. After compilation when I load the my index page I got followings warnings in the chrome console: Failed to decode downloaded font : http : //localhost:3000/fonts/ionicons.ttf?v=2.0.0 prospects : 1 OTS parsing error : invalid version tag Failed to decode downloaded font : http : //localhost:3000/fonts/ionicons.woff?v=2.0.0 prospects : 1 OTS parsing error : invalid version tag The issue is its not loading icons instead of that its showing squares . we used

Could not initialize class sun.awt.X11GraphicsEnvironment on Solaris

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am running into this error while running my installer on a Solaris machine: Installing... ------------- [==================|==================|==================|==================] [---Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX) Stack Trace: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.createGE

How to change font face of Webview in Android?

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want change the default font of webview to a custom font. I'm using webview in developing an bilingual browser app for Android. I tried getting an instance of custom typeface by placing my custom font in assets. But still couldn't set webview's default font to my font. This is what I tried: Typeface font = Typeface.createFromAsset(getAssets(), "myfont.ttf"); private WebView webview; WebSettings webSettings = webView.getSettings(); webSettings.setFixedFontFamily(font); Can anyone correct this or suggest any other method to change webview's

Font is not available to the JVM with Jasper Reports

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to generate report with DynamicJasper, but I'm getting the following error: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. msttcorefonts is installed, but I guess the JVM is not using any fonts from it. I'm using Ubuntu 10.04. How can I fix this? 回答1: I tried installing mscorefonts, but the package was installed and up-to-date. sudo apt-get update sudo apt-get install ttf-mscorefonts-installer I tried searching for the font in the filesystem, with: ls /usr/share/fonts/truetype