Add CreateFallbackForScript to SkTypeface for Android.

WebKit uses HarfBuzz directly to do Complex Text Layout, so it needs to get the
proper SkTypeface to pass it to HarfBuzz. However, on Android, fallback scripts
have no name, and we can only get them by file name each time (CreateFromFile).
This actually breaks the semantics of SkTypeface, which states 'The ID should
be unique for the underlying font file/data, not unique per typeface instance.'

And add 2 helper function to convert between FallbackScripts enum and font file
name. These are useful for WebKit's FontCache, which needs string as key.

https://codereview.appspot.com/5797066/

git-svn-id: http://skia.googlecode.com/svn/trunk@3403 2bbb7eff-a529-9590-31e7-b0007b416f81
2 files changed