| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 Simplified Chinese may be different than the font used for serif Japanese.</p> | 310 Simplified Chinese may be different than the font used for serif Japanese.</p> |
| 311 <p>The generic font families supported by Chrome are based on | 311 <p>The generic font families supported by Chrome are based on |
| 312 <a href="http://www.w3.org/TR/CSS21/fonts.html#generic-font-families">CSS generi
c font families</a> | 312 <a href="http://www.w3.org/TR/CSS21/fonts.html#generic-font-families">CSS generi
c font families</a> |
| 313 and are listed in the API reference below. When a webpage specifies a generic | 313 and are listed in the API reference below. When a webpage specifies a generic |
| 314 font family, Chrome selects the font based on the corresponding setting. If no | 314 font family, Chrome selects the font based on the corresponding setting. If no |
| 315 generic font family is specified, Chrome uses the setting for the "standard" | 315 generic font family is specified, Chrome uses the setting for the "standard" |
| 316 generic font family.</p> | 316 generic font family.</p> |
| 317 <p>When a webpage specifies a language, Chrome selects the font based on the | 317 <p>When a webpage specifies a language, Chrome selects the font based on the |
| 318 setting for the corresponding language script. If no language is specified, | 318 setting for the corresponding language script. If no language is specified, |
| 319 Chrome uses the setting for the default, or global, script.</p> | 319 Chrome uses the setting for the default, or global, script.</p> |
| 320 <p>The supported language scripts are based on ISO 15924 script codes and listed | 320 <p>The supported language scripts are specified by ISO 15924 script code and |
| 321 in the API reference below. Technically, Chrome settings are not strictly | 321 listed in the API reference below. Technically, Chrome settings are not strictly |
| 322 per-script but also depend on language. For example, Chrome chooses the font for | 322 per-script but also depend on language. For example, Chrome chooses the font for |
| 323 Hangul (ISO 15924 script code "Hang") when a webpage specifies Korean language, | 323 Cyrillic (ISO 15924 script code "Cyrl") when a webpage specifies the Russian |
| 324 and uses this font not just for Hangul script but for everything the font | 324 language, and uses this font not just for Cyrillic script but for everything the |
| 325 covers, such as Hanja.</p> | 325 font covers, such as Latin.</p> |
| 326 <p>Although ISO 15924 provides script codes like "Japn" for Japanese and "Kore" | |
| 327 for Korean, these codes are newer than "Hrkt" and "Hang" which Chrome continues | |
| 328 to use for compatibility purposes.</p> | |
| 329 <h2 id="examples">Examples</h2> | 326 <h2 id="examples">Examples</h2> |
| 330 <p>The following code gets the standard font for Arabic.</p> | 327 <p>The following code gets the standard font for Arabic.</p> |
| 331 <pre>chrome.experimental.fontSettings.getFont( | 328 <pre>chrome.experimental.fontSettings.getFont( |
| 332 { genericFamily: 'standard', script: 'Arab' }, | 329 { genericFamily: 'standard', script: 'Arab' }, |
| 333 function(details) { console.log(details.fontName); } | 330 function(details) { console.log(details.fontName); } |
| 334 ); | 331 ); |
| 335 </pre> | 332 </pre> |
| 336 <p>The next snippet sets the sans-serif font for Japanese.</p> | 333 <p>The next snippet sets the sans-serif font for Japanese.</p> |
| 337 <pre>chrome.experimental.fontSettings.setFont( | 334 <pre>chrome.experimental.fontSettings.setFont( |
| 338 { genericFamily: 'sansserif', script: 'Hrkt', fontName: 'IPAPGothic' } | 335 { genericFamily: 'sansserif', script: 'Jpan', fontName: 'IPAPGothic' } |
| 339 ); | 336 ); |
| 340 </pre> | 337 </pre> |
| 341 <p>You can find a sample extension using the Font Settings API in the | 338 <p>You can find a sample extension using the Font Settings API in the |
| 342 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> | 339 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/fontSettings/">examples/api/fontSettings</a> |
| 343 directory. For other examples and for help in viewing the source code, see | 340 directory. For other examples and for help in viewing the source code, see |
| 344 <a href="samples.html">Samples</a>.</p> | 341 <a href="samples.html">Samples</a>.</p> |
| 345 <!-- END AUTHORED CONTENT --> | 342 <!-- END AUTHORED CONTENT --> |
| 346 </div> | 343 </div> |
| 347 <!-- API PAGE --> | 344 <!-- API PAGE --> |
| 348 <div class="apiPage"> | 345 <div class="apiPage"> |
| (...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3054 <div> | 3051 <div> |
| 3055 <dt> | 3052 <dt> |
| 3056 <em> | 3053 <em> |
| 3057 <!-- TYPE --> | 3054 <!-- TYPE --> |
| 3058 <div style="display:inline"> | 3055 <div style="display:inline"> |
| 3059 ( | 3056 ( |
| 3060 <span class="enum">enumerated</span> | 3057 <span class="enum">enumerated</span> |
| 3061 <span id="typeTemplate"> | 3058 <span id="typeTemplate"> |
| 3062 <span> | 3059 <span> |
| 3063 <span>string</span> | 3060 <span>string</span> |
| 3064 <span>["Arab", "Armn", "Beng", "Cans", "Cher", "Cyrl", "
Deva", "Ethi", "Geor", "Grek", "Gujr", "Guru", "Hang", "Hans", "Hant", "Hebr", "
Hrkt", "Knda", "Khmr", "Laoo", "Mlym", "Mong", "Mymr", "Orya", "Sinh", "Taml", "
Telu", "Thaa", "Thai", "Tibt", "Yiii", "Zyyy"]</span> | 3061 <span>["Arab", "Armn", "Beng", "Cans", "Cher", "Cyrl", "
Deva", "Ethi", "Geor", "Grek", "Gujr", "Guru", "Hans", "Hant", "Hebr", "Jpan", "
Knda", "Kore", "Khmr", "Laoo", "Mlym", "Mong", "Mymr", "Orya", "Sinh", "Taml", "
Telu", "Thaa", "Thai", "Tibt", "Yiii", "Zyyy"]</span> |
| 3065 </span> | 3062 </span> |
| 3066 </span> | 3063 </span> |
| 3067 ) | 3064 ) |
| 3068 </div> | 3065 </div> |
| 3069 </em> | 3066 </em> |
| 3070 </dt> | 3067 </dt> |
| 3071 <dd>An ISO 15924 script code. The default, or global, script is repres
ented by script code "Zyyy".</dd> | 3068 <dd>An ISO 15924 script code. The default, or global, script is repres
ented by script code "Zyyy".</dd> |
| 3072 <!-- OBJECT PROPERTIES --> | 3069 <!-- OBJECT PROPERTIES --> |
| 3073 <!-- OBJECT METHODS --> | 3070 <!-- OBJECT METHODS --> |
| 3074 <!-- OBJECT EVENT FIELDS --> | 3071 <!-- OBJECT EVENT FIELDS --> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3159 _uff=0; | 3156 _uff=0; |
| 3160 urchinTracker(); | 3157 urchinTracker(); |
| 3161 } | 3158 } |
| 3162 catch(e) {/* urchinTracker not available. */} | 3159 catch(e) {/* urchinTracker not available. */} |
| 3163 </script> | 3160 </script> |
| 3164 <!-- end analytics --> | 3161 <!-- end analytics --> |
| 3165 </div> | 3162 </div> |
| 3166 </div> <!-- /gc-footer --> | 3163 </div> <!-- /gc-footer --> |
| 3167 </div> <!-- /gc-container --> | 3164 </div> <!-- /gc-container --> |
| 3168 </body></html> | 3165 </body></html> |
| OLD | NEW |