| 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.mojom; | 5 module font_service.mojom; |
| 6 | 6 |
| 7 import "mojo/common/common_custom_types.mojom"; |
| 8 |
| 7 enum TypefaceSlant { | 9 enum TypefaceSlant { |
| 8 ROMAN = 0, | 10 ROMAN = 0, |
| 9 ITALIC = 1, | 11 ITALIC = 1, |
| 10 OBLIQUE = 2, | 12 OBLIQUE = 2, |
| 11 }; | 13 }; |
| 12 | 14 |
| 13 struct TypefaceStyle { | 15 struct TypefaceStyle { |
| 14 uint16 weight; | 16 uint16 weight; |
| 15 uint8 width; | 17 uint8 width; |
| 16 TypefaceSlant slant; | 18 TypefaceSlant slant; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 32 // | 34 // |
| 33 // We still need to load fonts from within a sandboxed process. We set | 35 // We still need to load fonts from within a sandboxed process. We set |
| 34 // up a service to match fonts and load them, | 36 // up a service to match fonts and load them, |
| 35 interface FontService { | 37 interface FontService { |
| 36 // Returns the best match for |family_name| and |style|. On error, returns a | 38 // Returns the best match for |family_name| and |style|. On error, returns a |
| 37 // null |identity|. | 39 // null |identity|. |
| 38 MatchFamilyName(string family_name, TypefaceStyle style) => | 40 MatchFamilyName(string family_name, TypefaceStyle style) => |
| 39 (FontIdentity? identity, string family_name, TypefaceStyle style); | 41 (FontIdentity? identity, string family_name, TypefaceStyle style); |
| 40 | 42 |
| 41 // Returns a handle to the raw font specified by |id_number|. | 43 // Returns a handle to the raw font specified by |id_number|. |
| 42 OpenStream(uint32 id_number) => (handle font_handle); | 44 OpenStream(uint32 id_number) => (mojo.common.mojom.File? font_handle); |
| 43 }; | 45 }; |
| OLD | NEW |