| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module font_service; | 5 module font_service; |
| 6 | 6 |
| 7 enum TypefaceSlant { | 7 enum TypefaceSlant { |
| 8 ROMAN = 0, | 8 ROMAN = 0, |
| 9 ITALIC = 1, | 9 ITALIC = 1, |
| 10 OBLIQUE = 2, |
| 10 }; | 11 }; |
| 11 | 12 |
| 12 struct TypefaceStyle { | 13 struct TypefaceStyle { |
| 13 uint16 weight; | 14 uint16 weight; |
| 14 uint8 width; | 15 uint8 width; |
| 15 TypefaceSlant slant; | 16 TypefaceSlant slant; |
| 16 }; | 17 }; |
| 17 | 18 |
| 18 // A reference to specific font on the font service. | 19 // A reference to specific font on the font service. |
| 19 struct FontIdentity { | 20 struct FontIdentity { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 // up a service to match fonts and load them, | 34 // up a service to match fonts and load them, |
| 34 interface FontService { | 35 interface FontService { |
| 35 // Returns the best match for |family_name| and |style|. On error, returns a | 36 // Returns the best match for |family_name| and |style|. On error, returns a |
| 36 // null |identity|. | 37 // null |identity|. |
| 37 MatchFamilyName(string family_name, TypefaceStyle style) => | 38 MatchFamilyName(string family_name, TypefaceStyle style) => |
| 38 (FontIdentity? identity, string family_name, TypefaceStyle style); | 39 (FontIdentity? identity, string family_name, TypefaceStyle style); |
| 39 | 40 |
| 40 // Returns a handle to the raw font specified by |id_number|. | 41 // Returns a handle to the raw font specified by |id_number|. |
| 41 OpenStream(uint32 id_number) => (handle font_handle); | 42 OpenStream(uint32 id_number) => (handle font_handle); |
| 42 }; | 43 }; |
| OLD | NEW |