bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SkOTTable_post_DEFINED |
| 9 | #define SkOTTable_post_DEFINED |
| 10 | |
| 11 | #include "SkEndian.h" |
| 12 | #include "SkOTTableTypes.h" |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 13 | |
| 14 | #pragma pack(push, 1) |
| 15 | |
| 16 | struct SkOTTablePostScript { |
bungeman@google.com | ec95a4a | 2012-06-25 14:26:48 +0000 | [diff] [blame] | 17 | static const SK_OT_CHAR TAG0 = 'p'; |
| 18 | static const SK_OT_CHAR TAG1 = 'o'; |
| 19 | static const SK_OT_CHAR TAG2 = 's'; |
| 20 | static const SK_OT_CHAR TAG3 = 't'; |
| 21 | static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTablePostScript>::value; |
| 22 | |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 23 | struct Format { |
bungeman | 8fd23a8 | 2016-08-16 12:27:49 -0700 | [diff] [blame] | 24 | enum Value : SK_OT_Fixed { |
| 25 | version1 = SkTEndian_SwapBE32(0x00010000), |
| 26 | version2 = SkTEndian_SwapBE32(0x00020000), |
| 27 | version2_5 = SkTEndian_SwapBE32(0x00025000), |
| 28 | version3 = SkTEndian_SwapBE32(0x00030000), |
| 29 | version4 = SkTEndian_SwapBE32(0x00040000), |
| 30 | }; |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 31 | SK_OT_Fixed value; |
| 32 | } format; |
| 33 | SK_OT_Fixed italicAngle; |
| 34 | SK_OT_FWORD underlinePosition; |
| 35 | SK_OT_FWORD underlineThickness; |
| 36 | SK_OT_ULONG isFixedPitch; |
| 37 | SK_OT_ULONG minMemType42; |
| 38 | SK_OT_ULONG maxMemType42; |
| 39 | SK_OT_ULONG minMemType1; |
| 40 | SK_OT_ULONG maxMemType1; |
| 41 | }; |
| 42 | |
| 43 | #pragma pack(pop) |
| 44 | |
| 45 | |
| 46 | #include <stddef.h> |
bungeman | 99fe822 | 2015-08-20 07:57:51 -0700 | [diff] [blame] | 47 | static_assert(offsetof(SkOTTablePostScript, maxMemType1) == 28, "SkOTTablePostScript_maxMemType1_not_at_28"); |
| 48 | static_assert(sizeof(SkOTTablePostScript) == 32, "sizeof_SkOTTablePostScript_not_32"); |
bungeman@google.com | f8d1aee | 2012-02-02 19:15:21 +0000 | [diff] [blame] | 49 | |
| 50 | #endif |