OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 unsigned short padding1; | 62 unsigned short padding1; |
63 }; | 63 }; |
64 | 64 |
65 struct TableDirectoryEntry { | 65 struct TableDirectoryEntry { |
66 BigEndianULong tag; | 66 BigEndianULong tag; |
67 BigEndianULong checkSum; | 67 BigEndianULong checkSum; |
68 BigEndianULong offset; | 68 BigEndianULong offset; |
69 BigEndianULong length; | 69 BigEndianULong length; |
70 }; | 70 }; |
71 | 71 |
| 72 #if !PLATFORM(CG) |
| 73 // Fixed type is not defined on non-CG platforms. |version| in sfntHeader |
| 74 // and headTable and |fontRevision| in headTable are of Fixed, but they're |
| 75 // not actually refered to anywhere. Therefore, we just have to match |
| 76 // the size (4 bytes). For the definition of Fixed type, see |
| 77 // http://developer.apple.com/documentation/mac/Legacy/GXEnvironment/GXEnvironme
nt-356.html#HEADING356-6. |
| 78 typedef int32_t Fixed; |
| 79 #endif |
| 80 |
72 struct sfntHeader { | 81 struct sfntHeader { |
73 Fixed version; | 82 Fixed version; |
74 BigEndianUShort numTables; | 83 BigEndianUShort numTables; |
75 BigEndianUShort searchRange; | 84 BigEndianUShort searchRange; |
76 BigEndianUShort entrySelector; | 85 BigEndianUShort entrySelector; |
77 BigEndianUShort rangeShift; | 86 BigEndianUShort rangeShift; |
78 TableDirectoryEntry tables[1]; | 87 TableDirectoryEntry tables[1]; |
79 }; | 88 }; |
80 | 89 |
81 struct OS2Table { | 90 struct OS2Table { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 | 387 |
379 if (fontHandle && numFonts != 1) { | 388 if (fontHandle && numFonts != 1) { |
380 RemoveFontMemResourceEx(fontHandle); | 389 RemoveFontMemResourceEx(fontHandle); |
381 return 0; | 390 return 0; |
382 } | 391 } |
383 | 392 |
384 return fontHandle; | 393 return fontHandle; |
385 } | 394 } |
386 | 395 |
387 } | 396 } |
OLD | NEW |