1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/sfnt/SkOTTable_OS_2.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +/* 1.5 + * Copyright 2012 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 + 1.11 +#ifndef SkOTTable_OS_2_DEFINED 1.12 +#define SkOTTable_OS_2_DEFINED 1.13 + 1.14 +#include "SkOTTable_OS_2_VA.h" 1.15 +#include "SkOTTable_OS_2_V0.h" 1.16 +#include "SkOTTable_OS_2_V1.h" 1.17 +#include "SkOTTable_OS_2_V2.h" 1.18 +#include "SkOTTable_OS_2_V3.h" 1.19 +#include "SkOTTable_OS_2_V4.h" 1.20 + 1.21 +#pragma pack(push, 1) 1.22 + 1.23 +struct SkOTTableOS2 { 1.24 + static const SK_OT_CHAR TAG0 = 'O'; 1.25 + static const SK_OT_CHAR TAG1 = 'S'; 1.26 + static const SK_OT_CHAR TAG2 = '/'; 1.27 + static const SK_OT_CHAR TAG3 = '2'; 1.28 + static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableOS2>::value; 1.29 + 1.30 + union Version { 1.31 + SK_OT_USHORT version; 1.32 + 1.33 + //original V0 TT 1.34 + struct VA : SkOTTableOS2_VA { } vA; 1.35 + struct V0 : SkOTTableOS2_V0 { } v0; 1.36 + struct V1 : SkOTTableOS2_V1 { } v1; 1.37 + struct V2 : SkOTTableOS2_V2 { } v2; 1.38 + //makes fsType 0-3 exclusive 1.39 + struct V3 : SkOTTableOS2_V3 { } v3; 1.40 + //defines fsSelection bits 7-9 1.41 + struct V4 : SkOTTableOS2_V4 { } v4; 1.42 + } version; 1.43 +}; 1.44 + 1.45 +#pragma pack(pop) 1.46 + 1.47 + 1.48 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::VA) == 68, sizeof_SkOTTableOS2__VA_not_68); 1.49 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V0) == 78, sizeof_SkOTTableOS2__V0_not_78); 1.50 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V1) == 86, sizeof_SkOTTableOS2__V1_not_86); 1.51 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V2) == 96, sizeof_SkOTTableOS2__V2_not_96); 1.52 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V3) == 96, sizeof_SkOTTableOS2__V3_not_96); 1.53 +SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V4) == 96, sizeof_SkOTTableOS2__V4_not_96); 1.54 + 1.55 +#endif