| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "platform/fonts/FontCache.h" | 32 #include "platform/fonts/FontCache.h" |
| 33 | 33 |
| 34 | 34 |
| 35 #include "platform/fonts/SimpleFontData.h" | 35 #include "platform/fonts/SimpleFontData.h" |
| 36 #include "platform/fonts/FontDescription.h" | 36 #include "platform/fonts/FontDescription.h" |
| 37 #include "platform/fonts/FontFaceCreationParams.h" | 37 #include "platform/fonts/FontFaceCreationParams.h" |
| 38 | 38 |
| 39 #include "SkTypeface_android.h" | 39 #include "SkTypeface_android.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace blink { |
| 42 | 42 |
| 43 static AtomicString getFamilyNameForCharacter(UChar32 c, UScriptCode script) | 43 static AtomicString getFamilyNameForCharacter(UChar32 c, UScriptCode script) |
| 44 { | 44 { |
| 45 // This is a hack to use the preferred font for CJK scripts. | 45 // This is a hack to use the preferred font for CJK scripts. |
| 46 // FIXME: Use new Skia API once Android system supports per-family and per-s
cript fallback fonts. | 46 // FIXME: Use new Skia API once Android system supports per-family and per-s
cript fallback fonts. |
| 47 const char* locale; | 47 const char* locale; |
| 48 switch (script) { | 48 switch (script) { |
| 49 case USCRIPT_SIMPLIFIED_HAN: | 49 case USCRIPT_SIMPLIFIED_HAN: |
| 50 locale = "zh-CN"; | 50 locale = "zh-CN"; |
| 51 break; | 51 break; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 examplerChar = 0xAC00; | 94 examplerChar = 0xAC00; |
| 95 break; | 95 break; |
| 96 default: | 96 default: |
| 97 // For other scripts, use the default generic family mapping logic. | 97 // For other scripts, use the default generic family mapping logic. |
| 98 return familyName; | 98 return familyName; |
| 99 } | 99 } |
| 100 | 100 |
| 101 return getFamilyNameForCharacter(examplerChar, script); | 101 return getFamilyNameForCharacter(examplerChar, script); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace WebCore | 104 } // namespace blink |
| OLD | NEW |