fonts interview questions
Top fonts frequently asked interview questions
Searching the web, I find heaps of different suggestions for what the proper MIME type for a font is, but I have yet to try any MIME type that rids me of a Chrome warning such as the following:
Resource interpreted as font but transferred with MIME type font/otf
The font is an OTF.
I've tried the following MIME types so far
- font/otf
- application/font-otf
- application/font
- application/otf
- application/octet-stream
- application/x-font-otf
- application/x-font-TrueType (I know it's not truetype, but one source quoted this for OTF)
Source: (StackOverflow)
I'm aware of the pdftk.exe
utility that can indicate which fonts are used by a PDF, and wether they are embedded or not.
Now the problem: given I had PDF files with embedded fonts -- how can I extract those fonts in a way that they are re-usable as regular font files? Are there (preferably free) tools which can do that? Also: can this be done programmatically with, say, iText?
Source: (StackOverflow)
When setting the size of fonts in CSS, should I be using a percent value (%
) or em
? Can you explain the advantage?
Source: (StackOverflow)
I have some custom made webfonts embedded on my site and I use stuff like
//-webkit-text-stroke-width: .05px;
//-webkit-text-stroke-color: white;
-webkit-font-smoothing: antialiased;
to style my rendering output. This works just fine in Safari and Chrome. I get way sharper edges and thinner lines.
Is there any way of doing stuff like that in Firefox? Or Opera?
Source: (StackOverflow)
I'm seeing the following CSS declaration in a stylesheet:
font: 12px/18px ...
What does the 12px/18px
part mean exactly?
Source: (StackOverflow)
I have just tried to change my font size in Eclipse 3.6.0 in the following way:
General → Appearance → Colors and Fonts → Java Editor text font
However, the font size only changed in the file I had open. How can I change the font size for all Java files and projects I open in Eclipse?
Source: (StackOverflow)
I'm looking for an HTML or ASCII character which is a triangle pointing up or down so that I can use it as a toggle switch.
I found ↑ (↑
), and ↓ (↓
) - but those have a narrow stem. I'm looking just for the HTML arrow "head".
Source: (StackOverflow)
Is there a way to add some custom font on website without using images, Flash or some other graphics?
For example, I was working on some wedding website, and I was finding a lot of nice fonts for that subject, but I can't find the right way to add that font on the server, and how do I include that font with CSS into the HTML? Is this possible to do without graphics?
Source: (StackOverflow)
I want to use a custom font for my android application which I am creating.
I can individually change the typeface of each object from Code, but I have hundreds of them.
So,
- Is there a way to do this from the XML? [Setting a custom typeface]
- Is there a way to do it from code in one place, to say that the whole application and all the components should use the custom typeface instead of the default one?
Thanks.
-Codevalley
Source: (StackOverflow)
With all the new CSS3 border stuff going on (-webkit...) is it now possible to add a border to your font ? (like the solid white border around the blue Twitter logo). If not, are there any not-to-ugly hacks that will accomplish this in CSS/XHTML or do I still need to fire up Photoshop
Source: (StackOverflow)
Is it possible to set any custom font in every control of the application? And not necessarily runtime ? (i.e. from xml if possible or only once for whole application in JAVA file)
I can set the font for one control from this code.
public static void setFont(TextView textView) {
Typeface tf = Typeface.createFromAsset(textView.getContext()
.getAssets(), "fonts/BPreplay.otf");
textView.setTypeface(tf);
}
And the problem with this code is it should be called for every control. And i want to call this or any similar method once, or if possible set the property in xml. Is it possible?
Source: (StackOverflow)
Today I updated Font Awesome package to 4.3.0 and noticed that woff2 font was added. That file is linked in CSS so I need to configure nginx to serve woff2 files properly.
Currently I have this block in nginx config for fonts:
location ~* \.(otf|eot|woff|ttf)$ {
types {font/opentype otf;}
types {application/vnd.ms-fontobject eot;}
types {font/truetype ttf;}
types {application/font-woff woff;}
}
What is proper mime type for woff2 fonts?
Source: (StackOverflow)
I want to create a close button using CSS only.
I'm sure I'm not the first to do this, so does anyone know which font has an 'x' the same width as height, so that it can be used cross-browser to look like a close button?
Source: (StackOverflow)
I need to use some google fonts on an intranet application. The clients may or may not have internet connection. Reading the license terms, it appears that its legally allowed.
Source: (StackOverflow)