Changing fonts in ggplot2

You just missed an initialization step I think. You can see what fonts you have available with the command windowsFonts(). For example mine looks like this when I started looking at this: > windowsFonts() $serif [1] “TT Times New Roman” $sans [1] “TT Arial” $mono [1] “TT Courier New” After intalling the package extraFont and … Read more

Custom fonts and XML layouts (Android)

You can extend TextView to set custom fonts as I learned here. TextViewPlus.java: package com.example; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Typeface; import android.util.AttributeSet; import android.util.Log; import android.widget.TextView; public class TextViewPlus extends TextView { private static final String TAG = “TextView”; public TextViewPlus(Context context) { super(context); } public TextViewPlus(Context context, AttributeSet attrs) { super(context, attrs); setCustomFont(context, … Read more

How to add some non-standard font to a website?

This could be done via CSS: <style type=”text/css”> @font-face { font-family: “My Custom Font”; src: url(http://www.example.org/mycustomfont.ttf) format(“truetype”); } p.customfont { font-family: “My Custom Font”, Verdana, Tahoma; } </style> <p class=”customfont”>Hello world!</p> It is supported for all of the regular browsers if you use TrueType-Fonts (TTF), the Web Open Font Format (WOFF) or Embedded Opentype (EOT).

Transparent text cut out of background

It’s possible with css3 but it’s not supported in all browsers With background-clip: text; you can use a background for the text, but you will have to align it with the background of the page body { background: url(http://www.color-hex.com/palettes/26323.png) repeat; margin:10px; } h1 { background-color:#fff; overflow:hidden; display:inline-block; padding:10px; font-weight:bold; font-family:arial; color:transparent; font-size:200px; } span { … Read more

Font Awesome How To

The <h2> tag is a block level element, which means it will take up the full width and not allow anything to be positioned next to it. You can overwrite this behavior in CSS by using inline-block: h2 { display: inline-block; } inline-block is really nice because it allows the element to be positioned ‘inline’, … Read more