| 1 | // Copyright 2013 The Servo Project Developers. See the COPYRIGHT |
| 2 | // file at the top-level directory of this distribution. |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 5 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 6 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
| 7 | // option. This file may not be copied, modified, or distributed |
| 8 | // except according to those terms. |
| 9 | |
| 10 | use freetype::{FT_Char, FT_UShort, FT_Short, FT_ULong, FT_Byte}; |
| 11 | |
| 12 | #[repr(C)] |
| 13 | pub struct TT_OS2 { |
| 14 | pub version: FT_UShort, |
| 15 | pub xAvgCharWidth: FT_Short, |
| 16 | pub usWeightClass: FT_UShort, |
| 17 | pub usWidthClass: FT_UShort, |
| 18 | pub fsType: FT_Short, |
| 19 | pub ySubscriptXSize: FT_Short, |
| 20 | pub ySubscriptYSize: FT_Short, |
| 21 | pub ySubscriptXOffset: FT_Short, |
| 22 | pub ySubscriptYOffset: FT_Short, |
| 23 | pub ySuperscriptXSize: FT_Short, |
| 24 | pub ySuperscriptYSize: FT_Short, |
| 25 | pub ySuperscriptXOffset: FT_Short, |
| 26 | pub ySuperscriptYOffset: FT_Short, |
| 27 | pub yStrikeoutSize: FT_Short, |
| 28 | pub yStrikeoutPosition: FT_Short, |
| 29 | pub sFamilyClass: FT_Short, |
| 30 | |
| 31 | pub panose: [FT_Byte; 10], |
| 32 | |
| 33 | pub ulUnicodeRange1: FT_ULong, /* Bits 0-31 */ |
| 34 | pub ulUnicodeRange2: FT_ULong, /* Bits 32-63 */ |
| 35 | pub ulUnicodeRange3: FT_ULong, /* Bits 64-95 */ |
| 36 | pub ulUnicodeRange4: FT_ULong, /* Bits 96-127 */ |
| 37 | |
| 38 | pub achVendID: [FT_Char; 4], |
| 39 | |
| 40 | pub fsSelection: FT_UShort, |
| 41 | pub usFirstCharIndex: FT_UShort, |
| 42 | pub usLastCharIndex: FT_UShort, |
| 43 | pub sTypoAscender: FT_Short, |
| 44 | pub sTypoDescender: FT_Short, |
| 45 | pub sTypoLineGap: FT_Short, |
| 46 | pub usWinAscent: FT_UShort, |
| 47 | pub usWinDescent: FT_UShort, |
| 48 | |
| 49 | /* only version 1 tables */ |
| 50 | |
| 51 | pub ulCodePageRange1: FT_ULong, /* Bits 0-31 */ |
| 52 | pub ulCodePageRange2: FT_ULong, /* Bits 32-63 */ |
| 53 | |
| 54 | /* only version 2 tables */ |
| 55 | |
| 56 | pub sxHeight: FT_Short, |
| 57 | pub sCapHeight: FT_Short, |
| 58 | pub usDefaultChar: FT_UShort, |
| 59 | pub usBreakChar: FT_UShort, |
| 60 | pub usMaxContext: FT_UShort, |
| 61 | } |