fonts

Browser is not displaying the correct font

安稳与你 提交于 2020-01-05 10:25:50
问题 I have this code in my CSS file, but the browser doesn't display the font: @font-face { font-family: 'font'; src: url("fonts/FS_Metal.ttf"); } .menu_head { width: 100%; position: relative; height: 30px; font-family: 'font'; } 回答1: this should be crossbrowser @font-face { font-family: 'your_font'; src: url('../font/your_font.eot'); src: url('../font/your_font.eot') format('embedded-opentype'), url('../font/your_font.woff') format('woff'), url('../font/your_font.ttf') format('truetype'), url('.

Loading a font from resources into PrivateFontCollection results in corruption repost

筅森魡賤 提交于 2020-01-05 10:12:10
问题 I am having some difficulty in loading a font from a resource into PrivateFontCollection. When I started this, I was successful in loading the font from a file, however I wish to embed the font into my project (so there is less file mess on the user side, and a bit less IO while the application is running). The following code will load the font, gets the proper name, and allows for scaling however none of the characters are showing up properly. static class Foo { public static string

XSL-FO: how to add “helvetica neue” fonts and output to pdf

情到浓时终转凉″ 提交于 2020-01-05 09:37:48
问题 Am I correct that it's not possible to use fonts from windows 7 c:\windows\fonts* when using XSL-FO (Apache FOP) to generate a pdf? I've just installed the "helvetica neue" font in OTF format. According to https://xmlgraphics.apache.org/fop/trunk/fonts.html "Support for system fonts relies on the Java AWT subsystem for font metric information. Through operating system registration, the AWT subsystem knows what fonts are available on the system, and the font metrics for each one. When working

tamil unicode font text scrambles/broken in android

巧了我就是萌 提交于 2020-01-05 08:03:32
问题 i need to use unicode font in android instead of bamini . I don't want to use script to convert to & from bamini to unicode. Typeface fontface2 = Typeface.createFromAsset(this.getAssets(), "fonts/Lohit-Tamil-Classical.ttf"); playBtn.setTypeface(fontface2); //playBtn.setText(UnicodeUtil.unicode2tsc(getContext().getString(R.string.QUIZ))); playBtn.setText(Html.fromHtml(getContext().getString(R.string.QUIZ))); it render tamil but the characters are scrambled. Please help to fix. Thanks Mahir 回答1

tamil unicode font text scrambles/broken in android

本小妞迷上赌 提交于 2020-01-05 08:03:29
问题 i need to use unicode font in android instead of bamini . I don't want to use script to convert to & from bamini to unicode. Typeface fontface2 = Typeface.createFromAsset(this.getAssets(), "fonts/Lohit-Tamil-Classical.ttf"); playBtn.setTypeface(fontface2); //playBtn.setText(UnicodeUtil.unicode2tsc(getContext().getString(R.string.QUIZ))); playBtn.setText(Html.fromHtml(getContext().getString(R.string.QUIZ))); it render tamil but the characters are scrambled. Please help to fix. Thanks Mahir 回答1

tamil unicode font text scrambles/broken in android

杀马特。学长 韩版系。学妹 提交于 2020-01-05 08:03:25
问题 i need to use unicode font in android instead of bamini . I don't want to use script to convert to & from bamini to unicode. Typeface fontface2 = Typeface.createFromAsset(this.getAssets(), "fonts/Lohit-Tamil-Classical.ttf"); playBtn.setTypeface(fontface2); //playBtn.setText(UnicodeUtil.unicode2tsc(getContext().getString(R.string.QUIZ))); playBtn.setText(Html.fromHtml(getContext().getString(R.string.QUIZ))); it render tamil but the characters are scrambled. Please help to fix. Thanks Mahir 回答1

JFace TableViewer - Setting font color for all Cells in table

自作多情 提交于 2020-01-05 07:47:12
问题 I have asked a very similar question, but I ended up using images instead of changing the color. I want all the text in the cells to be dark grey. I understand that you have to assign each column. But I do not how to do it. This is one of my columns in my TableViewer. col = new TableViewerColumn(this , SWT.NONE); col.getColumn().setWidth(200); col.getColumn().setText("Printer/Profile"); col.setLabelProvider(new ColumnLabelProvider() { @Override public String getText(Object element) {

aggdraw cannot load font (no text renderer)

筅森魡賤 提交于 2020-01-05 05:52:34
问题 I've installed aggdraw on OS X 10.8 using Apple's stock Python (2.7.2) using these instructions. Before doing so, I used homebrew to install freetype, and I modified aggdraw's setup.py to point to my freetype installation ( FREETYPE_ROOT = "/usr/local/Cellar/freetype/2.4.10/" on line 32). Despite all of this, when I try to load a font, I get: $ python test.py Traceback (most recent call last): File "test.py", line 9, in <module> font = Font('black', '/Library/Fonts/Georgia.ttf') IOError:

font.setColor method not working after libGDX update to latest version

房东的猫 提交于 2020-01-05 04:10:17
问题 I have some 3-4 years old game project in libGDX. Now I decided to update it and to move from Eclipse to Android studio. So, I installed A.S. downloaded and installed fresh libGDX project. Then added my old source files and assets. All went well, with some minor changes game runs. Except font.setColor is not working any more - text on screen is black. Transparency is not working neither. That worked well before. So, my font is generated with Hiero, and it's white (I saw that in some other

How to read font size and font name in .docx in Apache POI(java)

狂风中的少年 提交于 2020-01-05 01:42:47
问题 Here is my code. XWPFRun run = runlist.get(0); double fontsize = (double)(run.getFontSize()); String fontfamily = (String)run.getFontFamily(); When it read the .docx file it will sometimes return -1 in font size and null in font family. I know that it's because they are default value but I don't want -1 and null I just want the name of that default value. How can I read it? 回答1: The font/character properties on a XWPFRun only return the override details, so settings which are different on