A good link on where to find good fonts for games, arcade games, etc.
I’m working on cover designs for my new “Functional Programming in Scala” book, and I want the words Functional Programming to be scary or intimidating. These are some different font ideas. The red fonts seem to get the “scary” point across well, though I suspect that some combinations of grays and white can also work.
To generate a list of all fonts available available with XeTex and XeLaTeX, use this command at your Unix command line:
fc-list : family
I found that command at this tex.stackexchange.com URL.
That command may also work with Windows, but I don’t have a Windows system to test with. Note that it took a little while to run the first time, then it returns almost instantly after that.
I’m not an expert on this subject just yet, but if you want the source code for an Android method to center text that you want to use with the
drawText method of the
Canvas class, I know that this code works in two places in my current Android app:
I don’t know the original source of this image — I just saw it on a friend’s Facebook timeline — but it’s a clever way to demonstrate that fonts matter, that they can help to show feelings or emotion.
Android FAQ: How do I programmatically set the font size (and/or font style) for an Android
Solution: Setting the Android
TextView font size programmatically is a simple two-step process. First, define everything about the font that you want to use in a resources file. For example, I put this code in a file named res/values/styles.xml:
This image shows examples of the Android “Roboto” font family. This android.com typography page shares more details about typography in Android applications. This SO page shows these possible Roboto styles:
android:fontFamily="sans-serif" // roboto regular android:fontFamily="sans-serif-light" // roboto light android:fontFamily="sans-serif-condensed" // roboto condensed android:fontFamily="sans-serif-thin" // roboto thin (android 4.2) android:fontFamily="sans-serif-medium" // roboto medium (android 5.0)
From this article, here is a list of the best fonts to use for readability and comprehension in printed documents.
I haven’t tested this with other Java components, but if you want/need to get the “system font”, this code gets the default system font from a
val outputArea = new JEditorPane val fontFamily = outputArea.getFont.getFamily
That code is written in Scala, but as you can see, it converts easily to Java. On Mac OS X 10.10,
fontFamily ends up being “Lucida Grande”.