Questions tagged [fonts]

A font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s most fonts are digital, used on computers.

Font files contain one or more fonts that can be accessed by the operating system and applications. Most modern fonts are stored in either the OpenType or TrueType formats, which can be used by both Macintosh and Windows computers.

Common font file extensions include .OTF, .TTF, .SVG and .FNT.

1. OpenType Font :

Font format developed by Adobe and Microsoft; combines aspects of PostScript and TrueType font formats; fully scalable, meaning the font can be resized without losing quality.

The OpenType font format is supported by Mac OS X and Windows 2000 and later.

2. TrueType Font :

Font file format created by Apple, but used on both Macintosh and Windows platforms; can be resized to any size without losing quality; also looks the same when printed as it does on the screen.

The TrueType font is the most common font format used by both Mac OS X and Windows platforms.

Links:

  1. Computer-font
  2. TrueType Font
  3. OpenType Font
19315 questions
262
votes
17 answers

How to Set a Custom Font in the ActionBar Title?

How (if possible) could I set a custom font in a ActionBar title text(only - not the tab text) with a font in my assets folder? I don't want to use the android:logo option.
user742030
260
votes
18 answers

Password hint font in Android

When an EditText is in password mode, it seems that the hint is shown in a different font (courrier?). How can I avoid this? I would like the hint to appear in the same font that when the EditText is not in password mode. My current xml:
hpique
  • 112,774
  • 126
  • 328
  • 461
256
votes
9 answers

How to add fonts to create-react-app based projects?

I'm using create-react-app and prefer not to eject. It's not clear where fonts imported via @font-face and loaded locally should go. Namely, I'm loading @font-face { font-family: 'Myriad Pro Regular'; font-style: normal; font-weight: normal; …
Maxim Veksler
  • 25,736
  • 34
  • 119
  • 148
256
votes
14 answers

Proper MIME type for OTF fonts

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…
David Hedlund
  • 121,697
  • 28
  • 196
  • 213
244
votes
18 answers

Unicode character for "X" cancel / close?

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?
Leonti
  • 9,212
  • 10
  • 35
  • 65
226
votes
5 answers

font-style: italic vs oblique in CSS

What is the difference between these two: font-style:italic font-style:oblique I tried using the W3Schools editor but was unable to tell the difference. What am I missing?
rajakvk
  • 8,983
  • 15
  • 43
  • 49
221
votes
4 answers

Including Google Web Fonts link or import?

What is the preferred way of including Google Web Fonts to a page? via the link tag? via import in a stylesheet? @import…
kajo
  • 4,961
  • 4
  • 29
  • 29
203
votes
13 answers

Algorithm to implement a word cloud like Wordle

Context Take a look at Wordle: http://www.wordle.net/ It's much better looking than any other word cloud generators I've seen Note: the source is not available - read the FAQ: http://www.wordle.net/faq#code My Questions Is there an algorithm…
namenlos
  • 4,875
  • 9
  • 36
  • 37
195
votes
12 answers

Dynamically changing font size of UILabel

I currently have a UILabel: factLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 280, 100)]; factLabel.text = @"some text some text some text some text"; factLabel.backgroundColor = [UIColor clearColor]; factLabel.lineBreakMode =…
CodeGuy
  • 26,751
  • 71
  • 191
  • 310
193
votes
10 answers

How can I determine what font a browser is actually using to render some text?

My CSS specifies "font-family: Helvetica, Arial, sans-serif;" for the whole page. It looks like Verdana is being used instead on some parts. I would like to be able to verify this. I've tried copying and pasting from my browser into Word, but it's…
lavaturtle
  • 2,142
  • 2
  • 15
  • 11
189
votes
13 answers

How can I use Google's Roboto font on a website?

I want to use Google's Roboto font on my website and I am following this tutorial: http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15 I have downloaded the file which has a folder structure like this: Now I have three…
user26
  • 3,097
  • 5
  • 19
  • 22
186
votes
2 answers

What does the forward slash mean in the CSS font shorthand?

I'm seeing the following CSS declaration in a stylesheet: font: 12px/18px ... What does the 12px/18px part mean exactly?
Webnet
  • 55,814
  • 100
  • 278
  • 454
182
votes
114 answers

Recommended Fonts for Programming?

What fonts do you use for programming, and for what language/IDE? I use Consolas for all my Visual Studio work, any other recommendations?
tbreffni
  • 5,008
  • 5
  • 28
  • 30
174
votes
18 answers

Custom fonts and XML layouts (Android)

I'm trying to define a GUI layout using XML files in Android. As far as I can find out, there is no way to specify that your widgets should use a custom font (e.g. one you've placed in assets/font/) in XML files and you can only use the system…
DrDefrost
  • 1,807
  • 3
  • 12
  • 5
171
votes
8 answers

How can I extract embedded fonts from a PDF as valid font files?

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…
simplybest55