Font or Images?
I've been wondering about this for some time now. In the game Angry Birds whenever a pig dies, a number appears depicting the amount of points gained by killing the pig. Are those digits part of a TTF font that the developers created? Or, are they simply images imported into the program? A good indicator that they are images is if there are multiple colors used in each digit (such as a gradient), but it seems as if one constant color is used, green.
As far as my understanding goes, fonts are black and white, and one can only replace the black with one color.
So, are the numbers that appear when killing pigs in Angry birds part of a TTF font that the developers created, or just a series of images开发者_JAVA百科 strung together?
Here is an example of what i'm talking about: Angry Birds
I don't know which one they're using here. I would suspect images just because Angry Birds is ported extensively, and using images means they don't have to worry about custom font support or text layout on each platform. But that's just a guess.
Just because something is a font doesn't mean it can't be drawn with a gradient. There are many ways to have gradients on fonts. A font can always be turned into a image by drawing it into a drawing context. You can then use that image as a mask on whatever gradient you like. Also, using Core Text you can convert glyphs into paths. So anything you can do with a path, you can do with a font.
精彩评论